|
| 1 | +--- |
| 2 | +title: "LI.FI Intents Dashboard" |
| 3 | +slug: "solver/dashboard" |
| 4 | +description: "The LI.FI Intents Dashboard enables solvers to manage their operations, create API keys, and participate in the intent marketplace for cross-chain transfers." |
| 5 | +sidebar: |
| 6 | + order: 3 |
| 7 | +--- |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | +The LI.FI Intents Dashboard is a web application that allows solvers to manage their operations within the LI.FI intent marketplace. This platform serves as the central hub for solvers to monitor their performance, manage API access, and configure their solver identity. |
| 12 | +It is a self serving platform. If you have any issues, please [reach out to us](mailto:hello@li.fi). |
| 13 | + |
| 14 | +## Getting Started |
| 15 | + |
| 16 | +### Account Creation |
| 17 | + |
| 18 | +Users can create an account by signing up through the dashboard. Once registered, they gain access to the solver management interface. |
| 19 | + |
| 20 | +### Solver Identity Setup |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | +After creating an account, users must set up their solver identity by configuring a solver name. This identity is required before users can create API keys or participate in the marketplace. |
| 25 | + |
| 26 | +### API Key Management |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | +Once a solver identity is established, users can create and manage API keys. These API keys are essential for: |
| 31 | + |
| 32 | +- **Pushing Quotes**: Submit inventory quotes to the order server using the `/quotes/submit` endpoint |
| 33 | +- **Registering Solver Accounts**: Solver accounts are essentials for reputation tracking. |
| 34 | + |
| 35 | +## Solver Account Registration |
| 36 | + |
| 37 | +:::note |
| 38 | +Solver addresses are registered through a cryptographic signature verification process that ensures only legitimate address owners can register their addresses as solver accounts. |
| 39 | +::: |
| 40 | + |
| 41 | +### Registration Endpoint |
| 42 | + |
| 43 | +**Endpoint**: `POST /solver-api/account/register` |
| 44 | +**Authentication**: Required (API Key) |
| 45 | +**Content-Type**: `application/json` |
| 46 | + |
| 47 | +### Request Format |
| 48 | + |
| 49 | +```json |
| 50 | +{ |
| 51 | + "address": "0x1234567890123456789012345678901234567890", |
| 52 | + "message": "Hello, world!", |
| 53 | + "signature": "0x1234567890abcdef..." |
| 54 | +} |
| 55 | +``` |
| 56 | + |
| 57 | +### Registration Process |
| 58 | + |
| 59 | +1. **Signature Verification**: The system validates that the signature was created by the claimed address using Ethereum's `verifyMessage` function |
| 60 | +2. **Address Uniqueness Check**: Each address can only be registered once across the entire system |
| 61 | +3. **Solver Association**: The address is automatically linked to the solver account associated with the API key used for authentication |
| 62 | + |
| 63 | +### Example Registration Flow |
| 64 | + |
| 65 | +```typescript |
| 66 | +// 1. Sign a message with your solver address |
| 67 | +// Using ethers.js or similar library |
| 68 | +const message = "Hello, world!"; |
| 69 | +const signature = await wallet.signMessage(message); |
| 70 | +``` |
| 71 | + |
| 72 | +```bash |
| 73 | +# 2. Register the address |
| 74 | +curl -X POST "https://order-dev.li.fi/solver-api/account/register" \ |
| 75 | + -H "Content-Type: application/json" \ |
| 76 | + -H "x-api-key: sk_your_api_key_here" \ |
| 77 | + -d '{ |
| 78 | + "address": "0x1234567890123456789012345678901234567890", |
| 79 | + "message": "Hello, world!", |
| 80 | + "signature": "0x1234567890abcdef..." |
| 81 | + }' |
| 82 | +``` |
| 83 | + |
| 84 | +### Response |
| 85 | + |
| 86 | +**Success Response**: |
| 87 | + |
| 88 | +```json |
| 89 | +{ |
| 90 | + "id": 1, |
| 91 | + "address": "0x1234567890123456789012345678901234567890", |
| 92 | + "solverId": 5, |
| 93 | + "createdAt": "2024-01-15T10:30:00.000Z", |
| 94 | + "updatedAt": "2024-01-15T10:30:00.000Z" |
| 95 | +} |
| 96 | +``` |
| 97 | + |
| 98 | +**Error Responses**: |
| 99 | + |
| 100 | +- `400 Bad Request`: Invalid request data |
| 101 | +- `401 Unauthorized`: Invalid signature or API key |
| 102 | +- `403 Forbidden`: Address already registered |
| 103 | +- `404 Not Found`: Solver not found |
| 104 | + |
| 105 | +### Managing Registered Addresses |
| 106 | + |
| 107 | +**View Registered Addresses**: `GET /solver-api/solver/identities` |
| 108 | + |
| 109 | +Returns all addresses registered under your solver account: |
| 110 | + |
| 111 | +```json |
| 112 | +[ |
| 113 | + { |
| 114 | + "id": 1, |
| 115 | + "address": "0x1234567890123456789012345678901234567890", |
| 116 | + "solverId": 5, |
| 117 | + "createdAt": "2024-01-15T10:30:00.000Z", |
| 118 | + "updatedAt": "2024-01-15T10:30:00.000Z" |
| 119 | + } |
| 120 | +] |
| 121 | +``` |
| 122 | + |
| 123 | +You can also view the registered addresses through the dashboard in the settings page. |
| 124 | + |
| 125 | + |
| 126 | + |
| 127 | +### Performance Monitoring |
| 128 | + |
| 129 | +The dashboard displays key metrics including: |
| 130 | + |
| 131 | +- Orders quoted |
| 132 | +- Quotes uploaded |
| 133 | +- Orders filled |
| 134 | +- Current reputation score |
| 135 | + |
| 136 | + |
0 commit comments