> ## Documentation Index
> Fetch the complete documentation index at: https://anypay-docs-update-resources-2026-06-29.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# SearchIntents

## Overview

The `SearchIntents` endpoint allows you to search for intents using various criteria such as owner address, intent address, or deposit transaction hash. This is useful for finding all intents associated with a wallet or tracking specific transactions.

## Use Cases

* Find all intents for a specific wallet address
* Look up an intent by its deposit transaction hash
* Track intents associated with a specific intent contract address
* Build transaction history interfaces
* Audit and analytics
* Retrieve intent IDs for status monitoring

## Request Parameters

All parameters are optional, but at least one should be provided:

* **byOwnerAddress** (string): Search by wallet address that created the intent
* **byOriginIntentAddress** (string): Search by origin chain intent contract address
* **byDepositTransactionHash** (string): Search by deposit transaction hash

## Response

The response includes:

* **intents** (Intent\[]): Array of matching intent objects

Each intent in the array contains all the standard intent fields as described in the `GetIntent` endpoint.

## Examples

### Search by Owner Address

Find all intents created by a specific wallet:

```typescript theme={null}
const searchResponse = await fetch('https://trails-api.sequence.app/rpc/Trails/SearchIntents', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-Access-Key': 'YOUR_ACCESS_KEY'
  },
  body: JSON.stringify({
    byOwnerAddress: '0x0709CF2d5D4f3D38f5948d697fE64d7FB3639Eb1'
  })
});

const { intents } = await searchResponse.json();

console.log(`Found ${intents.length} intents`);
intents.forEach(intent => {
  console.log(`Intent ${intent.intentId}: ${intent.status}`);
});
```

### Search by Deposit Transaction Hash

Look up an intent using its deposit transaction:

```typescript theme={null}
const searchResponse = await fetch('https://trails-api.sequence.app/rpc/Trails/SearchIntents', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-Access-Key': 'YOUR_ACCESS_KEY'
  },
  body: JSON.stringify({
    byDepositTransactionHash: '0x1234567890abcdef...'
  })
});

const { intents } = await searchResponse.json();

if (intents.length > 0) {
  console.log('Found intent:', intents[0].intentId);
  console.log('Status:', intents[0].status);
} else {
  console.log('No intent found for this transaction');
}
```

### Search by Origin Intent Address

Find all intents using a specific intent contract:

```typescript theme={null}
const searchResponse = await fetch('https://trails-api.sequence.app/rpc/Trails/SearchIntents', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-Access-Key': 'YOUR_ACCESS_KEY'
  },
  body: JSON.stringify({
    byOriginIntentAddress: '0xabcdef1234567890...'
  })
});

const { intents } = await searchResponse.json();
console.log('Found intents:', intents.map(i => i.intentId));
```

## Building a Transaction History

Create a user-friendly transaction history:

```typescript theme={null}
async function getTransactionHistory(userAddress: string) {
  const { intents } = await fetch('https://trails-api.sequence.app/rpc/Trails/SearchIntents', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'X-Access-Key': 'YOUR_ACCESS_KEY'
    },
    body: JSON.stringify({
      byOwnerAddress: userAddress
    })
  }).then(r => r.json());
  
  // Sort by creation date (newest first)
  const sorted = intents.sort((a, b) => 
    new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime()
  );
  
  // Format for display
  return sorted.map(intent => ({
    id: intent.intentId,
    status: intent.status,
    fromChain: intent.quoteRequest.originChainId,
    toChain: intent.quoteRequest.destinationChainId,
    fromAmount: intent.quote.fromAmount,
    toAmount: intent.quote.toAmount,
    totalFees: intent.fees.totalFeeUsd,
    createdAt: intent.createdAt,
    expiresAt: intent.expiresAt
  }));
}

const history = await getTransactionHistory('0x0709CF2d5D4f3D38f5948d697fE64d7FB3639Eb1');
console.table(history);
```

## UI Component Example

```tsx theme={null}
import { useState, useEffect } from 'react';
import type { Intent } from '0xtrails';

function IntentHistory({ userAddress }: { userAddress: string }) {
  const [intents, setIntents] = useState<Intent[]>([]);
  const [loading, setLoading] = useState(true);
  
  useEffect(() => {
    async function loadIntents() {
      try {
        const response = await fetch(
          'https://trails-api.sequence.app/rpc/Trails/SearchIntents',
          {
            method: 'POST',
            headers: {
              'Content-Type': 'application/json',
              'X-Access-Key': 'YOUR_ACCESS_KEY'
            },
            body: JSON.stringify({
              byOwnerAddress: userAddress
            })
          }
        );
        
        const { intents } = await response.json();
        setIntents(intents);
      } catch (error) {
        console.error('Failed to load intents:', error);
      } finally {
        setLoading(false);
      }
    }
    
    loadIntents();
  }, [userAddress]);
  
  if (loading) return <div>Loading...</div>;
  
  return (
    <div className="intent-history">
      <h2>Transaction History</h2>
      {intents.length === 0 ? (
        <p>No transactions found</p>
      ) : (
        <ul>
          {intents.map(intent => (
            <li key={intent.intentId}>
              <div>
                <strong>{intent.intentId}</strong>
                <span className={`status-${intent.status.toLowerCase()}`}>
                  {intent.status}
                </span>
              </div>
              <div>
                Chain {intent.quoteRequest.originChainId} → 
                Chain {intent.quoteRequest.destinationChainId}
              </div>
              <div>
                {intent.quote.fromAmount} → {intent.quote.toAmount}
              </div>
              <div>
                Fee: ${intent.fees.totalFeeUsd}
              </div>
              <div>
                {new Date(intent.createdAt).toLocaleString()}
              </div>
            </li>
          ))}
        </ul>
      )}
    </div>
  );
}
```

## Filtering and Analytics

```typescript theme={null}
import { TrailsApi, type Intent } from '@0xtrails/api'

const trailsApi = new TrailsApi('YOUR_API_KEY')

async function analyzeUserActivity(userAddress: string) {
    const { intents } = await trailsApi.searchIntents({ byOwnerAddress: userAddress });

    const stats = {
        total: intents.length,
        succeeded: intents.filter((i: Intent) => i.status === 'SUCCEEDED').length,
        failed: intents.filter((i: Intent) => i.status === 'FAILED').length,
        pending: intents.filter((i: Intent) =>
            ['QUOTED', 'COMMITTED', 'EXECUTING'].includes(i.status)
        ).length,
        totalVolume: intents.reduce((sum: number, i: Intent) => sum + Number(i.quote.fromAmount), 0),
        totalFees: intents.reduce((sum: number, i: Intent) => sum + (i.fees.totalFeeUsd), 0),
        chains: [...new Set(intents.flatMap((i: Intent) =>
            [i.quoteRequest.originChainId, i.quoteRequest.destinationChainId]
        ))],
        providers: [...new Set(intents.map((i: Intent) => i.quote.quoteProvider))]
    };

    return stats;
}

const stats = await analyzeUserActivity('0x0709CF2d5D4f3D38f5948d697fE64d7FB3639Eb1');
console.log('User Activity:', stats);
```

## Pagination Considerations

<Warning>
  The `SearchIntents` endpoint may return a large number of results for active addresses. Consider implementing client-side pagination or using `GetIntentHistory` for paginated results.
</Warning>

## Best Practices

1. **Cache results**: Store search results locally to reduce API calls
2. **Filter on client**: Apply additional filters on the client side after fetching
3. **Limit date range**: Use `createdAt` timestamps to filter by date range
4. **Combine with GetIntentReceipt**: Fetch receipts for intents that need transaction hashes

## Example: Recent Active Intents

```typescript theme={null}
import { TrailsApi, type Intent } from '@0xtrails/api'

const trailsApi = new TrailsApi('YOUR_API_KEY')

async function getRecentActiveIntents(userAddress: string, hoursAgo: number = 24) {
    const { intents } = await trailsApi.searchIntents({ byOwnerAddress: userAddress });

    const cutoff = Date.now() - (hoursAgo * 60 * 60 * 1000);

    return intents
        .filter((i: Intent) => i.createdAt && new Date(i.createdAt).getTime() > cutoff)
        .filter((i: Intent) => ['COMMITTED', 'EXECUTING'].includes(i.status))
        .sort((a, b) =>
            new Date(b.createdAt ?? '').getTime() - new Date(a.createdAt ?? '').getTime()
        );
}

const activeIntents = await getRecentActiveIntents(userAddress, 24);
console.log('Active intents in last 24h:', activeIntents.length);
```

<Info>
  For paginated transaction history with full receipt data, use the `GetIntentHistory` endpoint instead.
</Info>

## Next Steps

* Use `GetIntent` to get full details for specific intents
* Use `GetIntentReceipt` to get transaction hashes and status
* Use `GetIntentHistory` for paginated history views with receipts


## OpenAPI

````yaml trails-api.gen.json post /rpc/Trails/SearchIntents
openapi: 3.0.0
info:
  title: Trails API
  version: 0.0.1
servers:
  - url: https://trails-api.sequence.app
    description: Trails API
security: []
paths:
  /rpc/Trails/SearchIntents:
    post:
      tags:
        - Trails
      operationId: Trails-SearchIntents
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SearchIntentsRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchIntentsResponse'
        4XX:
          description: Client error
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ErrorWebrpcEndpoint'
                  - $ref: '#/components/schemas/ErrorWebrpcRequestFailed'
                  - $ref: '#/components/schemas/ErrorWebrpcBadRoute'
                  - $ref: '#/components/schemas/ErrorWebrpcBadMethod'
                  - $ref: '#/components/schemas/ErrorWebrpcBadRequest'
                  - $ref: '#/components/schemas/ErrorWebrpcClientAborted'
                  - $ref: '#/components/schemas/ErrorWebrpcStreamLost'
                  - $ref: '#/components/schemas/ErrorUnauthorized'
                  - $ref: '#/components/schemas/ErrorPermissionDenied'
                  - $ref: '#/components/schemas/ErrorSessionExpired'
                  - $ref: '#/components/schemas/ErrorMethodNotFound'
                  - $ref: '#/components/schemas/ErrorRequestConflict'
                  - $ref: '#/components/schemas/ErrorAborted'
                  - $ref: '#/components/schemas/ErrorGeoblocked'
                  - $ref: '#/components/schemas/ErrorRateLimited'
                  - $ref: '#/components/schemas/ErrorProjectNotFound'
                  - $ref: '#/components/schemas/ErrorAccessKeyNotFound'
                  - $ref: '#/components/schemas/ErrorAccessKeyMismatch'
                  - $ref: '#/components/schemas/ErrorInvalidOrigin'
                  - $ref: '#/components/schemas/ErrorInvalidService'
                  - $ref: '#/components/schemas/ErrorUnauthorizedUser'
                  - $ref: '#/components/schemas/ErrorQuotaExceeded'
                  - $ref: '#/components/schemas/ErrorQuotaRateLimit'
                  - $ref: '#/components/schemas/ErrorNoDefaultKey'
                  - $ref: '#/components/schemas/ErrorMaxAccessKeys'
                  - $ref: '#/components/schemas/ErrorAtLeastOneKey'
                  - $ref: '#/components/schemas/ErrorTimeout'
                  - $ref: '#/components/schemas/ErrorInvalidArgument'
                  - $ref: '#/components/schemas/ErrorUnavailable'
                  - $ref: '#/components/schemas/ErrorQueryFailed'
                  - $ref: '#/components/schemas/ErrorIntentStatus'
                  - $ref: '#/components/schemas/ErrorNotFound'
                  - $ref: '#/components/schemas/ErrorUnsupportedNetwork'
                  - $ref: '#/components/schemas/ErrorClientOutdated'
                  - $ref: '#/components/schemas/ErrorIntentsSkipped'
                  - $ref: '#/components/schemas/ErrorQuoteExpired'
                  - $ref: '#/components/schemas/ErrorHighPriceImpact'
                  - $ref: '#/components/schemas/ErrorIntentsDisabled'
        5XX:
          description: Server error
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ErrorWebrpcBadResponse'
                  - $ref: '#/components/schemas/ErrorWebrpcServerPanic'
                  - $ref: '#/components/schemas/ErrorWebrpcInternalError'
                  - $ref: '#/components/schemas/ErrorUnexpected'
                  - $ref: '#/components/schemas/ErrorChainNodeHealth'
components:
  schemas:
    SearchIntentsRequest:
      type: object
      properties:
        byIntentId:
          type: string
        byProjectId:
          type: number
        byTransactionHash:
          type: string
        byOwnerAddress:
          type: string
        byOriginIntentAddress:
          type: string
        byDestinationIntentAddress:
          type: string
        byQueryString:
          type: string
    SearchIntentsResponse:
      type: object
      required:
        - intents
      properties:
        intents:
          type: array
          description: '[]Intent'
          items:
            $ref: '#/components/schemas/Intent'
    ErrorWebrpcEndpoint:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: WebrpcEndpoint
        code:
          type: number
          example: 0
        msg:
          type: string
          example: endpoint error
        cause:
          type: string
        status:
          type: number
          example: 400
    ErrorWebrpcRequestFailed:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: WebrpcRequestFailed
        code:
          type: number
          example: -1
        msg:
          type: string
          example: request failed
        cause:
          type: string
        status:
          type: number
          example: 400
    ErrorWebrpcBadRoute:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: WebrpcBadRoute
        code:
          type: number
          example: -2
        msg:
          type: string
          example: bad route
        cause:
          type: string
        status:
          type: number
          example: 404
    ErrorWebrpcBadMethod:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: WebrpcBadMethod
        code:
          type: number
          example: -3
        msg:
          type: string
          example: bad method
        cause:
          type: string
        status:
          type: number
          example: 405
    ErrorWebrpcBadRequest:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: WebrpcBadRequest
        code:
          type: number
          example: -4
        msg:
          type: string
          example: bad request
        cause:
          type: string
        status:
          type: number
          example: 400
    ErrorWebrpcClientAborted:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: WebrpcClientAborted
        code:
          type: number
          example: -8
        msg:
          type: string
          example: request aborted by client
        cause:
          type: string
        status:
          type: number
          example: 400
    ErrorWebrpcStreamLost:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: WebrpcStreamLost
        code:
          type: number
          example: -9
        msg:
          type: string
          example: stream lost
        cause:
          type: string
        status:
          type: number
          example: 400
    ErrorUnauthorized:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: Unauthorized
        code:
          type: number
          example: 1000
        msg:
          type: string
          example: Unauthorized access
        cause:
          type: string
        status:
          type: number
          example: 401
    ErrorPermissionDenied:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: PermissionDenied
        code:
          type: number
          example: 1001
        msg:
          type: string
          example: Permission denied
        cause:
          type: string
        status:
          type: number
          example: 403
    ErrorSessionExpired:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: SessionExpired
        code:
          type: number
          example: 1002
        msg:
          type: string
          example: Session expired
        cause:
          type: string
        status:
          type: number
          example: 403
    ErrorMethodNotFound:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: MethodNotFound
        code:
          type: number
          example: 1003
        msg:
          type: string
          example: Method not found
        cause:
          type: string
        status:
          type: number
          example: 404
    ErrorRequestConflict:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: RequestConflict
        code:
          type: number
          example: 1004
        msg:
          type: string
          example: Conflict with target resource
        cause:
          type: string
        status:
          type: number
          example: 409
    ErrorAborted:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: Aborted
        code:
          type: number
          example: 1005
        msg:
          type: string
          example: Request aborted
        cause:
          type: string
        status:
          type: number
          example: 400
    ErrorGeoblocked:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: Geoblocked
        code:
          type: number
          example: 1006
        msg:
          type: string
          example: Geoblocked region
        cause:
          type: string
        status:
          type: number
          example: 451
    ErrorRateLimited:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: RateLimited
        code:
          type: number
          example: 1007
        msg:
          type: string
          example: Rate-limited. Please slow down.
        cause:
          type: string
        status:
          type: number
          example: 429
    ErrorProjectNotFound:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: ProjectNotFound
        code:
          type: number
          example: 1008
        msg:
          type: string
          example: Project not found
        cause:
          type: string
        status:
          type: number
          example: 401
    ErrorAccessKeyNotFound:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: AccessKeyNotFound
        code:
          type: number
          example: 1101
        msg:
          type: string
          example: Access key not found
        cause:
          type: string
        status:
          type: number
          example: 401
    ErrorAccessKeyMismatch:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: AccessKeyMismatch
        code:
          type: number
          example: 1102
        msg:
          type: string
          example: Access key mismatch
        cause:
          type: string
        status:
          type: number
          example: 409
    ErrorInvalidOrigin:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: InvalidOrigin
        code:
          type: number
          example: 1103
        msg:
          type: string
          example: Invalid origin for Access Key
        cause:
          type: string
        status:
          type: number
          example: 403
    ErrorInvalidService:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: InvalidService
        code:
          type: number
          example: 1104
        msg:
          type: string
          example: Service not enabled for Access key
        cause:
          type: string
        status:
          type: number
          example: 403
    ErrorUnauthorizedUser:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: UnauthorizedUser
        code:
          type: number
          example: 1105
        msg:
          type: string
          example: Unauthorized user
        cause:
          type: string
        status:
          type: number
          example: 403
    ErrorQuotaExceeded:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: QuotaExceeded
        code:
          type: number
          example: 1200
        msg:
          type: string
          example: Quota request exceeded
        cause:
          type: string
        status:
          type: number
          example: 429
    ErrorQuotaRateLimit:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: QuotaRateLimit
        code:
          type: number
          example: 1201
        msg:
          type: string
          example: Quota rate limit exceeded
        cause:
          type: string
        status:
          type: number
          example: 429
    ErrorNoDefaultKey:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: NoDefaultKey
        code:
          type: number
          example: 1300
        msg:
          type: string
          example: No default access key found
        cause:
          type: string
        status:
          type: number
          example: 403
    ErrorMaxAccessKeys:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: MaxAccessKeys
        code:
          type: number
          example: 1301
        msg:
          type: string
          example: Access keys limit reached
        cause:
          type: string
        status:
          type: number
          example: 403
    ErrorAtLeastOneKey:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: AtLeastOneKey
        code:
          type: number
          example: 1302
        msg:
          type: string
          example: You need at least one Access Key
        cause:
          type: string
        status:
          type: number
          example: 403
    ErrorTimeout:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: Timeout
        code:
          type: number
          example: 1900
        msg:
          type: string
          example: Request timed out
        cause:
          type: string
        status:
          type: number
          example: 408
    ErrorInvalidArgument:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: InvalidArgument
        code:
          type: number
          example: 2000
        msg:
          type: string
          example: Invalid argument
        cause:
          type: string
        status:
          type: number
          example: 400
    ErrorUnavailable:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: Unavailable
        code:
          type: number
          example: 2002
        msg:
          type: string
          example: Unavailable resource
        cause:
          type: string
        status:
          type: number
          example: 400
    ErrorQueryFailed:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: QueryFailed
        code:
          type: number
          example: 2003
        msg:
          type: string
          example: Query failed
        cause:
          type: string
        status:
          type: number
          example: 400
    ErrorIntentStatus:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: IntentStatus
        code:
          type: number
          example: 2004
        msg:
          type: string
          example: Invalid intent status
        cause:
          type: string
        status:
          type: number
          example: 422
    ErrorNotFound:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: NotFound
        code:
          type: number
          example: 8000
        msg:
          type: string
          example: Resource not found
        cause:
          type: string
        status:
          type: number
          example: 400
    ErrorUnsupportedNetwork:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: UnsupportedNetwork
        code:
          type: number
          example: 8008
        msg:
          type: string
          example: Unsupported network
        cause:
          type: string
        status:
          type: number
          example: 422
    ErrorClientOutdated:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: ClientOutdated
        code:
          type: number
          example: 8009
        msg:
          type: string
          example: Client is outdated
        cause:
          type: string
        status:
          type: number
          example: 422
    ErrorIntentsSkipped:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: IntentsSkipped
        code:
          type: number
          example: 7000
        msg:
          type: string
          example: >-
            Intents skipped as client is attempting a transaction that does not
            require intents
        cause:
          type: string
        status:
          type: number
          example: 400
    ErrorQuoteExpired:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: QuoteExpired
        code:
          type: number
          example: 7001
        msg:
          type: string
          example: Intent quote has expired. Please try again.
        cause:
          type: string
        status:
          type: number
          example: 400
    ErrorHighPriceImpact:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: HighPriceImpact
        code:
          type: number
          example: 7002
        msg:
          type: string
          example: Quote unavailable due to high price impact
        cause:
          type: string
        status:
          type: number
          example: 422
    ErrorIntentsDisabled:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: IntentsDisabled
        code:
          type: number
          example: 9000
        msg:
          type: string
          example: Intents service is currently unavailable
        cause:
          type: string
        status:
          type: number
          example: 400
    ErrorWebrpcBadResponse:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: WebrpcBadResponse
        code:
          type: number
          example: -5
        msg:
          type: string
          example: bad response
        cause:
          type: string
        status:
          type: number
          example: 500
    ErrorWebrpcServerPanic:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: WebrpcServerPanic
        code:
          type: number
          example: -6
        msg:
          type: string
          example: server panic
        cause:
          type: string
        status:
          type: number
          example: 500
    ErrorWebrpcInternalError:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: WebrpcInternalError
        code:
          type: number
          example: -7
        msg:
          type: string
          example: internal error
        cause:
          type: string
        status:
          type: number
          example: 500
    ErrorUnexpected:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: Unexpected
        code:
          type: number
          example: 2001
        msg:
          type: string
          example: Unexpected server error
        cause:
          type: string
        status:
          type: number
          example: 500
    ErrorChainNodeHealth:
      type: object
      required:
        - error
        - code
        - msg
        - status
      properties:
        error:
          type: string
          example: ChainNodeHealth
        code:
          type: number
          example: 9001
        msg:
          type: string
          example: Intent quote is unavailable due to interrupted chain node access
        cause:
          type: string
        status:
          type: number
          example: 503
    Intent:
      type: object
      required:
        - id
        - projectId
        - intentId
        - status
        - quoteRequest
        - ownerAddress
        - originChainId
        - destinationChainId
        - originIntentAddress
        - salt
        - depositTransaction
        - originCalls
        - originPrecondition
        - originMetaTxn
        - quote
        - fees
        - trailsVersion
        - trailsContracts
        - expiresAt
      properties:
        id:
          type: number
        projectId:
          type: number
        intentId:
          type: string
        status:
          $ref: '#/components/schemas/IntentStatus'
        quoteRequest:
          $ref: '#/components/schemas/QuoteIntentRequest'
        ownerAddress:
          type: string
        originChainId:
          type: number
        destinationChainId:
          type: number
        originIntentAddress:
          type: string
        destinationIntentAddress:
          type: string
        salt:
          type: number
        depositTransaction:
          $ref: '#/components/schemas/DepositTransaction'
        passthrough:
          type: boolean
        originCalls:
          $ref: '#/components/schemas/IntentCalls'
        destinationCalls:
          $ref: '#/components/schemas/IntentCalls'
        originPrecondition:
          $ref: '#/components/schemas/TransactionPrecondition'
        destinationPrecondition:
          $ref: '#/components/schemas/TransactionPrecondition'
        originMetaTxn:
          $ref: '#/components/schemas/MetaTxn'
        destinationMetaTxn:
          $ref: '#/components/schemas/MetaTxn'
        quote:
          $ref: '#/components/schemas/IntentProviderQuote'
        fees:
          $ref: '#/components/schemas/IntentFees'
        trailsVersion:
          type: string
        intentProtocol:
          $ref: '#/components/schemas/IntentProtocolVersion'
        trailsContracts:
          $ref: '#/components/schemas/TrailsContracts'
        expiresAt:
          type: string
        updatedAt:
          type: string
        createdAt:
          type: string
    IntentStatus:
      type: string
      description: Represented as uint8 on the server side
      enum:
        - QUOTED
        - COMMITTED
        - EXECUTING
        - FAILED
        - SUCCEEDED
        - ABORTED
        - REFUNDED
        - INVALID
    QuoteIntentRequest:
      type: object
      required:
        - ownerAddress
        - originChainId
        - originTokenAddress
        - destinationChainId
        - destinationTokenAddress
      properties:
        ownerAddress:
          type: string
        originChainId:
          type: number
        originTokenAddress:
          type: string
        destinationChainId:
          type: number
        destinationTokenAddress:
          type: string
        destinationToAddress:
          type: string
        destinationApproveAddress:
          type: string
        destinationCallData:
          type: string
        destinationCallValue:
          type: number
        originTokenAmount:
          type: number
        destinationTokenAmount:
          type: number
        tradeType:
          $ref: '#/components/schemas/TradeType'
        fundMethod:
          $ref: '#/components/schemas/FundMethod'
        onlyNativeGasFee:
          type: boolean
        options:
          $ref: '#/components/schemas/QuoteIntentRequestOptions'
    DepositTransaction:
      type: object
      required:
        - toAddress
        - tokenAddress
        - amount
        - chainId
        - to
        - data
        - value
      properties:
        toAddress:
          type: string
        tokenAddress:
          type: string
        decimals:
          type: number
        amount:
          type: number
        chainId:
          type: number
        to:
          type: string
        data:
          type: string
        value:
          type: number
    IntentCalls:
      type: object
      required:
        - chainId
        - calls
      properties:
        chainId:
          type: number
        space:
          type: number
        nonce:
          type: number
        calls:
          type: array
          description: '[]TransactionCall'
          items:
            $ref: '#/components/schemas/TransactionCall'
    TransactionPrecondition:
      type: object
      required:
        - type
        - chainId
        - ownerAddress
        - tokenAddress
        - minAmount
      properties:
        type:
          type: string
        chainId:
          type: number
        ownerAddress:
          type: string
        tokenAddress:
          type: string
        minAmount:
          type: number
    MetaTxn:
      type: object
      required:
        - id
        - chainId
        - walletAddress
        - contract
        - input
      properties:
        id:
          type: string
        chainId:
          type: number
        walletAddress:
          type: string
        contract:
          type: string
        input:
          type: string
        bridgeGas:
          type: number
    IntentProviderQuote:
      type: object
      required:
        - routeProviders
        - routeProvidersRequestIds
        - routeProvidersFeeUsd
        - fromAmount
        - fromAmountMin
        - fromAmountUsd
        - fromAmountMinUsd
        - toAmount
        - toAmountMin
        - toAmountUsd
        - toAmountMinUsd
        - maxSlippage
        - priceImpact
        - priceImpactUsd
        - priceImpactDetails
      properties:
        routeProviders:
          type: array
          description: '[]RouteProvider'
          items:
            $ref: '#/components/schemas/RouteProvider'
        routeProvidersRequestIds:
          type: array
          description: '[]string'
          items:
            type: string
        routeProvidersFeeUsd:
          type: array
          description: '[]float64'
          items:
            type: number
        estimatedDuration:
          type: number
        fromAmount:
          type: number
        fromAmountMin:
          type: number
        fromAmountUsd:
          type: number
        fromAmountMinUsd:
          type: number
        toAmount:
          type: number
        toAmountMin:
          type: number
        toAmountUsd:
          type: number
        toAmountMinUsd:
          type: number
        maxSlippage:
          type: number
        priceImpact:
          type: number
        priceImpactUsd:
          type: number
        priceImpactDetails:
          $ref: '#/components/schemas/PriceImpactDetails'
    IntentFees:
      type: object
      required:
        - originGas
        - provider
        - feeTokenAddress
        - feeTokenAmount
        - feeTokenUsd
        - feeTokenTotal
        - gasFeeTotal
        - gasFeeUsd
        - trailsFeeTotal
        - trailsFeeUsd
        - collectorFeeTotal
        - collectorFeeUsd
        - providerFeeTotal
        - providerFeeUsd
        - totalFeeAmount
        - totalFeeUsd
      properties:
        originGas:
          $ref: '#/components/schemas/IntentTransactionGasFee'
        destinationGas:
          $ref: '#/components/schemas/IntentTransactionGasFee'
        provider:
          $ref: '#/components/schemas/IntentProviderFees'
        feeTokenAddress:
          type: string
        feeTokenAmount:
          type: number
        feeTokenUsd:
          type: number
        feeTokenTotal:
          type: number
        gasFeeTotal:
          type: number
        gasFeeUsd:
          type: number
        trailsFeeTotal:
          type: number
        trailsFeeUsd:
          type: number
        collectorFeeTotal:
          type: number
        collectorFeeUsd:
          type: number
        providerFeeTotal:
          type: number
        providerFeeUsd:
          type: number
        totalFeeAmount:
          type: number
        totalFeeUsd:
          type: number
    IntentProtocolVersion:
      type: string
      description: Represented as string on the server side
      enum:
        - v1
        - v1_5
    TrailsContracts:
      type: object
      required:
        - trailsIntentEntrypointAddress
        - trailsRouterAddress
        - trailsRouterShimAddress
      properties:
        trailsIntentEntrypointAddress:
          type: string
        trailsRouterAddress:
          type: string
        trailsRouterShimAddress:
          type: string
    TradeType:
      type: string
      description: Represented as string on the server side
      enum:
        - EXACT_INPUT
        - EXACT_OUTPUT
    FundMethod:
      type: string
      description: Represented as string on the server side
      enum:
        - WALLET
        - DIRECT_TRANSFER
        - ONRAMP_MESH
        - ONRAMP_MELD
    QuoteIntentRequestOptions:
      type: object
      properties:
        intentProtocol:
          $ref: '#/components/schemas/IntentProtocolVersion'
        swapProvider:
          $ref: '#/components/schemas/RouteProvider'
        bridgeProvider:
          $ref: '#/components/schemas/RouteProvider'
        swapProviderFallback:
          type: boolean
        bridgeProviderFallback:
          type: boolean
        preference:
          $ref: '#/components/schemas/RoutePreference'
        slippageTolerance:
          type: number
        trailsAddressOverrides:
          $ref: '#/components/schemas/TrailsAddressOverrides'
    TransactionCall:
      type: object
      required:
        - to
      properties:
        to:
          type: string
        value:
          type: number
        data:
          type: string
        gasLimit:
          type: number
        delegateCall:
          type: boolean
        onlyFallback:
          type: boolean
        behaviorOnError:
          type: number
    RouteProvider:
      type: string
      description: Represented as string on the server side
      enum:
        - AUTO
        - CCTP
        - GASZIP
        - LIFI
        - LZ_OFT
        - RELAY
        - SUSHI
        - WETH
        - ZEROX
    PriceImpactDetails:
      type: object
      required:
        - executionPriceImpact
        - marketPriceImpact
        - providerFeesPriceImpact
        - trailsFeesPriceImpact
        - netPriceImpact
      properties:
        executionPriceImpact:
          $ref: '#/components/schemas/PriceImpact'
        marketPriceImpact:
          $ref: '#/components/schemas/PriceImpact'
        providerFeesPriceImpact:
          $ref: '#/components/schemas/PriceImpact'
        trailsFeesPriceImpact:
          $ref: '#/components/schemas/PriceImpact'
        netPriceImpact:
          $ref: '#/components/schemas/PriceImpact'
    IntentTransactionGasFee:
      type: object
      required:
        - chainId
        - totalGasLimit
        - gasPrice
        - nativeTokenSymbol
        - chainGasUsageStatus
        - totalFeeAmount
        - totalFeeUsd
        - metaTxnFeeDetails
        - metaTxnGasQuote
      properties:
        chainId:
          type: number
        totalGasLimit:
          type: number
        gasPrice:
          type: number
        nativeTokenSymbol:
          type: string
        nativeTokenPriceUsd:
          type: number
        chainGasUsageStatus:
          $ref: '#/components/schemas/ChainGasUsageStatus'
        totalFeeAmount:
          type: number
        totalFeeUsd:
          type: string
        metaTxnFeeDetails:
          $ref: '#/components/schemas/MetaTxnFeeDetails'
        metaTxnGasQuote:
          type: string
    IntentProviderFees:
      type: object
      required:
        - quoteProvider
        - quoteProviderFee
        - quoteProviderFeeUsd
        - trailsFee
        - trailsFeeUsd
        - quoteProviderWithTrailsFee
        - providerWithTrailsFeeUsd
        - totalFeeAmount
        - totalFeeUsd
      properties:
        quoteProvider:
          type: string
        quoteProviderFee:
          type: number
        quoteProviderFeeUsd:
          type: number
        trailsFee:
          type: number
        trailsFeeUsd:
          type: number
        quoteProviderWithTrailsFee:
          type: number
        providerWithTrailsFeeUsd:
          type: number
        totalFeeAmount:
          type: number
        totalFeeUsd:
          type: number
    RoutePreference:
      type: string
      description: Represented as string on the server side
      enum:
        - RECOMMENDED
        - FASTEST
        - CHEAPEST
        - TRUSTLESS
    TrailsAddressOverrides:
      type: object
      properties:
        sequenceWalletFactoryAddress:
          type: string
        sequenceWalletMainModuleAddress:
          type: string
        sequenceWalletMainModuleUpgradableAddress:
          type: string
        sequenceWalletGuestModuleAddress:
          type: string
        sequenceWalletUtilsAddress:
          type: string
    PriceImpact:
      type: object
      required:
        - priceImpact
        - priceImpactUsd
      properties:
        priceImpact:
          type: number
        priceImpactUsd:
          type: number
    ChainGasUsageStatus:
      type: string
      description: Represented as string on the server side
      enum:
        - NORMAL
        - BUSY
        - VERY_BUSY
    MetaTxnFeeDetails:
      type: object
      required:
        - metaTxnId
        - estimatedGasLimit
        - feeNative
      properties:
        metaTxnId:
          type: string
        estimatedGasLimit:
          type: number
        feeNative:
          type: number

````