@eco-foundation/api-schemas 0.15.0 → 0.17.0

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.
Files changed (37) hide show
  1. package/README.md +21 -30
  2. package/dist/fixtures/index.js +12 -10
  3. package/dist/fixtures/index.js.map +1 -1
  4. package/dist/fixtures/v1/intents-status.response.gasless-handoff.json +30 -0
  5. package/dist/fixtures/v1/intents-status.response.intent-filled.json +21 -0
  6. package/dist/fixtures/v1/intents-status.response.quote-enriched.json +63 -0
  7. package/dist/fixtures/v1/intents-status.response.quote-filled-detail.json +60 -0
  8. package/dist/fixtures/v1/intents-status.response.unknown.json +20 -0
  9. package/dist/fixtures/v1/intents-status.response.wallet-page.json +27 -0
  10. package/dist/generated/build-digest.json +1 -1
  11. package/dist/index.d.ts +1 -1
  12. package/dist/v1/endpoints/quotes.d.ts +76 -0
  13. package/dist/v1/endpoints/quotes.js +12 -1
  14. package/dist/v1/endpoints/quotes.js.map +1 -1
  15. package/dist/v1/endpoints/registry.d.ts +135 -123
  16. package/dist/v1/endpoints/registry.js +3 -4
  17. package/dist/v1/endpoints/registry.js.map +1 -1
  18. package/dist/v1/endpoints/status.d.ts +70 -2
  19. package/dist/v1/endpoints/status.js +11 -1
  20. package/dist/v1/endpoints/status.js.map +1 -1
  21. package/dist/v1/enums.d.ts +3 -1
  22. package/dist/v1/enums.js +6 -1
  23. package/dist/v1/enums.js.map +1 -1
  24. package/dist/v1/index.d.ts +0 -1
  25. package/dist/v1/index.js +0 -1
  26. package/dist/v1/index.js.map +1 -1
  27. package/dist/v1/types.d.ts +21 -88
  28. package/openapi/v1.json +582 -714
  29. package/package.json +2 -1
  30. package/dist/fixtures/v1/intents-status.response.completed-fulfilled.json +0 -117
  31. package/dist/fixtures/v1/intents-status.response.completed-refunded.json +0 -101
  32. package/dist/fixtures/v1/intents-status.response.empty.json +0 -13
  33. package/dist/fixtures/v1/intents-status.response.pending-fulfillment.json +0 -101
  34. package/dist/fixtures/v1/intents-status.response.unlinked-intent.json +0 -81
  35. package/dist/v1/endpoints/transfer-status.d.ts +0 -488
  36. package/dist/v1/endpoints/transfer-status.js +0 -197
  37. package/dist/v1/endpoints/transfer-status.js.map +0 -1
package/openapi/v1.json CHANGED
@@ -869,7 +869,8 @@
869
869
  "enum": [
870
870
  "local",
871
871
  "bucket-candidate",
872
- "stitched-destination"
872
+ "stitched-destination",
873
+ "chainer-child"
873
874
  ]
874
875
  },
875
876
  "intentHash": {
@@ -1154,6 +1155,53 @@
1154
1155
  "route",
1155
1156
  "reward"
1156
1157
  ]
1158
+ },
1159
+ "chainerOrder": {
1160
+ "type": "object",
1161
+ "properties": {
1162
+ "encodedOrder": {
1163
+ "type": "string",
1164
+ "pattern": "^0x(?:[0-9a-fA-F]{2})*$"
1165
+ },
1166
+ "encodedTemplate": {
1167
+ "type": "string",
1168
+ "pattern": "^0x(?:[0-9a-fA-F]{2})*$"
1169
+ },
1170
+ "templateHash": {
1171
+ "type": "string",
1172
+ "pattern": "^0x[0-9a-fA-F]{64}$"
1173
+ },
1174
+ "paramsHash": {
1175
+ "type": "string",
1176
+ "pattern": "^0x[0-9a-fA-F]{64}$"
1177
+ },
1178
+ "programId": {
1179
+ "type": "string",
1180
+ "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
1181
+ },
1182
+ "escrowAuthority": {
1183
+ "type": "string",
1184
+ "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
1185
+ },
1186
+ "tokenProgram": {
1187
+ "type": "string",
1188
+ "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
1189
+ },
1190
+ "escrowAta": {
1191
+ "type": "string",
1192
+ "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
1193
+ }
1194
+ },
1195
+ "required": [
1196
+ "encodedOrder",
1197
+ "encodedTemplate",
1198
+ "templateHash",
1199
+ "paramsHash",
1200
+ "programId",
1201
+ "escrowAuthority",
1202
+ "tokenProgram",
1203
+ "escrowAta"
1204
+ ]
1157
1205
  }
1158
1206
  },
1159
1207
  "required": [
@@ -2197,7 +2245,8 @@
2197
2245
  "enum": [
2198
2246
  "local",
2199
2247
  "bucket-candidate",
2200
- "stitched-destination"
2248
+ "stitched-destination",
2249
+ "chainer-child"
2201
2250
  ]
2202
2251
  },
2203
2252
  "intentHash": {
@@ -2482,6 +2531,53 @@
2482
2531
  "route",
2483
2532
  "reward"
2484
2533
  ]
2534
+ },
2535
+ "chainerOrder": {
2536
+ "type": "object",
2537
+ "properties": {
2538
+ "encodedOrder": {
2539
+ "type": "string",
2540
+ "pattern": "^0x(?:[0-9a-fA-F]{2})*$"
2541
+ },
2542
+ "encodedTemplate": {
2543
+ "type": "string",
2544
+ "pattern": "^0x(?:[0-9a-fA-F]{2})*$"
2545
+ },
2546
+ "templateHash": {
2547
+ "type": "string",
2548
+ "pattern": "^0x[0-9a-fA-F]{64}$"
2549
+ },
2550
+ "paramsHash": {
2551
+ "type": "string",
2552
+ "pattern": "^0x[0-9a-fA-F]{64}$"
2553
+ },
2554
+ "programId": {
2555
+ "type": "string",
2556
+ "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
2557
+ },
2558
+ "escrowAuthority": {
2559
+ "type": "string",
2560
+ "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
2561
+ },
2562
+ "tokenProgram": {
2563
+ "type": "string",
2564
+ "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
2565
+ },
2566
+ "escrowAta": {
2567
+ "type": "string",
2568
+ "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
2569
+ }
2570
+ },
2571
+ "required": [
2572
+ "encodedOrder",
2573
+ "encodedTemplate",
2574
+ "templateHash",
2575
+ "paramsHash",
2576
+ "programId",
2577
+ "escrowAuthority",
2578
+ "tokenProgram",
2579
+ "escrowAta"
2580
+ ]
2485
2581
  }
2486
2582
  },
2487
2583
  "required": [
@@ -4118,18 +4214,26 @@
4118
4214
  "/v1/intents/status": {
4119
4215
  "get": {
4120
4216
  "operationId": "intents.status",
4121
- "summary": "Track a transfer by tx hash, intent hash, quote id, gasless job id or wallet. Always 200; a lookup that matches nothing returns no results. Exactly one selector; page and limit apply to txHash, jobId and wallet only.",
4217
+ "summary": "Track intents, quotes and solver gasless jobs. Always 200; an unknown exact id reports status \"unknown\".",
4122
4218
  "tags": [
4123
4219
  "status",
4124
4220
  "stable"
4125
4221
  ],
4126
4222
  "parameters": [
4127
4223
  {
4128
- "name": "txHash",
4224
+ "name": "intentHash",
4225
+ "in": "query",
4226
+ "required": false,
4227
+ "schema": {
4228
+ "type": "string",
4229
+ "pattern": "^0x[0-9a-fA-F]{64}$"
4230
+ }
4231
+ },
4232
+ {
4233
+ "name": "sourceTxHash",
4129
4234
  "in": "query",
4130
4235
  "required": false,
4131
4236
  "schema": {
4132
- "description": "A transaction hash in the transfer (EVM 0x + 64 hex, Tron 64 hex, Solana base58). Creation and fulfilment transactions are indexed today; refund and CCTP mint hashes are not yet and return no results.",
4133
4237
  "anyOf": [
4134
4238
  {
4135
4239
  "type": "string",
@@ -4147,13 +4251,45 @@
4147
4251
  }
4148
4252
  },
4149
4253
  {
4150
- "name": "intentHash",
4254
+ "name": "destinationTxHash",
4151
4255
  "in": "query",
4152
4256
  "required": false,
4153
4257
  "schema": {
4154
- "description": "An intent hash.",
4155
- "type": "string",
4156
- "pattern": "^0x[0-9a-fA-F]{64}$"
4258
+ "anyOf": [
4259
+ {
4260
+ "type": "string",
4261
+ "pattern": "^0x[0-9a-fA-F]{64}$"
4262
+ },
4263
+ {
4264
+ "type": "string",
4265
+ "pattern": "^[0-9a-fA-F]{64}$"
4266
+ },
4267
+ {
4268
+ "type": "string",
4269
+ "pattern": "^[1-9A-HJ-NP-Za-km-z]{64,88}$"
4270
+ }
4271
+ ]
4272
+ }
4273
+ },
4274
+ {
4275
+ "name": "txHash",
4276
+ "in": "query",
4277
+ "required": false,
4278
+ "schema": {
4279
+ "anyOf": [
4280
+ {
4281
+ "type": "string",
4282
+ "pattern": "^0x[0-9a-fA-F]{64}$"
4283
+ },
4284
+ {
4285
+ "type": "string",
4286
+ "pattern": "^[0-9a-fA-F]{64}$"
4287
+ },
4288
+ {
4289
+ "type": "string",
4290
+ "pattern": "^[1-9A-HJ-NP-Za-km-z]{64,88}$"
4291
+ }
4292
+ ]
4157
4293
  }
4158
4294
  },
4159
4295
  {
@@ -4161,7 +4297,6 @@
4161
4297
  "in": "query",
4162
4298
  "required": false,
4163
4299
  "schema": {
4164
- "description": "A quote id: a bare uuid, `quote:<uuid>` or `quoteResponse:<uuid>`.",
4165
4300
  "anyOf": [
4166
4301
  {
4167
4302
  "type": "string",
@@ -4171,10 +4306,6 @@
4171
4306
  {
4172
4307
  "type": "string",
4173
4308
  "pattern": "^quote:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
4174
- },
4175
- {
4176
- "type": "string",
4177
- "pattern": "^quoteResponse:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
4178
4309
  }
4179
4310
  ]
4180
4311
  }
@@ -4184,7 +4315,6 @@
4184
4315
  "in": "query",
4185
4316
  "required": false,
4186
4317
  "schema": {
4187
- "description": "A submit job id.",
4188
4318
  "type": "string",
4189
4319
  "format": "uuid",
4190
4320
  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
@@ -4195,40 +4325,35 @@
4195
4325
  "in": "query",
4196
4326
  "required": false,
4197
4327
  "schema": {
4198
- "description": "A wallet address (funder, destination recipient or refund recipient); returns its transfers from the last 7 days, newest first.",
4199
- "anyOf": [
4200
- {
4201
- "type": "string",
4202
- "pattern": "^0x[0-9a-fA-F]{40}$"
4203
- },
4204
- {
4205
- "anyOf": [
4206
- {
4207
- "type": "string",
4208
- "pattern": "^T[1-9A-HJ-NP-Za-km-z]{33}$"
4209
- },
4210
- {
4211
- "type": "string",
4212
- "pattern": "^0x41[0-9a-fA-F]{40}$"
4213
- }
4214
- ]
4215
- },
4216
- {
4217
- "type": "string",
4218
- "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
4219
- }
4328
+ "type": "string",
4329
+ "minLength": 1
4330
+ }
4331
+ },
4332
+ {
4333
+ "name": "status",
4334
+ "in": "query",
4335
+ "required": false,
4336
+ "schema": {
4337
+ "type": "string",
4338
+ "enum": [
4339
+ "pending",
4340
+ "filled",
4341
+ "settled",
4342
+ "refunded",
4343
+ "refundable",
4344
+ "expired",
4345
+ "failed",
4346
+ "unknown"
4220
4347
  ]
4221
4348
  }
4222
4349
  },
4223
4350
  {
4224
- "name": "page",
4351
+ "name": "cursor",
4225
4352
  "in": "query",
4226
4353
  "required": false,
4227
4354
  "schema": {
4228
- "description": "Page number, default 1.",
4229
- "type": "integer",
4230
- "minimum": 1,
4231
- "maximum": 9007199254740991
4355
+ "type": "string",
4356
+ "minLength": 1
4232
4357
  }
4233
4358
  },
4234
4359
  {
@@ -4236,7 +4361,7 @@
4236
4361
  "in": "query",
4237
4362
  "required": false,
4238
4363
  "schema": {
4239
- "description": "Default 20, maximum 50. A deployment may publish a lower maximum and default in /v1/chains; a value above the maximum is rejected, never clamped.",
4364
+ "default": 20,
4240
4365
  "type": "integer",
4241
4366
  "minimum": 1,
4242
4367
  "maximum": 50
@@ -4258,34 +4383,23 @@
4258
4383
  "type": "object",
4259
4384
  "properties": {
4260
4385
  "id": {
4261
- "anyOf": [
4262
- {
4263
- "type": "string",
4264
- "pattern": "^quote:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
4265
- },
4266
- {
4267
- "type": "null"
4268
- }
4269
- ]
4386
+ "type": "string",
4387
+ "minLength": 1
4270
4388
  },
4271
- "status": {
4389
+ "type": {
4272
4390
  "type": "string",
4273
4391
  "enum": [
4274
- "pending",
4275
- "completed"
4392
+ "intent",
4393
+ "quote",
4394
+ "gasless",
4395
+ "deposit-address"
4276
4396
  ]
4277
4397
  },
4278
- "substatus": {
4398
+ "status": {
4279
4399
  "type": "string",
4280
- "enum": [
4281
- "waiting_for_funding",
4282
- "waiting_for_fulfillment",
4283
- "waiting_for_refund",
4284
- "fulfilled",
4285
- "refunded"
4286
- ]
4400
+ "minLength": 1
4287
4401
  },
4288
- "createdAt": {
4402
+ "updatedAt": {
4289
4403
  "anyOf": [
4290
4404
  {
4291
4405
  "type": "integer",
@@ -4297,729 +4411,385 @@
4297
4411
  }
4298
4412
  ]
4299
4413
  },
4300
- "updatedAt": {
4414
+ "intentHashes": {
4415
+ "type": "array",
4416
+ "items": {
4417
+ "type": "string",
4418
+ "pattern": "^0x[0-9a-fA-F]{64}$"
4419
+ }
4420
+ },
4421
+ "txHash": {
4301
4422
  "anyOf": [
4302
4423
  {
4303
- "type": "integer",
4304
- "minimum": 0,
4305
- "maximum": 4102444800
4424
+ "type": "string"
4306
4425
  },
4307
4426
  {
4308
4427
  "type": "null"
4309
4428
  }
4310
4429
  ]
4311
4430
  },
4312
- "refundAddress": {
4313
- "anyOf": [
4314
- {
4315
- "anyOf": [
4316
- {
4431
+ "subStatuses": {
4432
+ "type": "array",
4433
+ "items": {
4434
+ "type": "object",
4435
+ "properties": {
4436
+ "chainId": {
4437
+ "type": "integer",
4438
+ "exclusiveMinimum": 0,
4439
+ "maximum": 9007199254740991
4440
+ },
4441
+ "quoteIds": {
4442
+ "type": "array",
4443
+ "items": {
4317
4444
  "type": "string",
4318
- "pattern": "^0x[0-9a-fA-F]{40}$"
4319
- },
4320
- {
4321
- "anyOf": [
4322
- {
4323
- "type": "string",
4324
- "pattern": "^T[1-9A-HJ-NP-Za-km-z]{33}$"
4325
- },
4326
- {
4327
- "type": "string",
4328
- "pattern": "^0x41[0-9a-fA-F]{40}$"
4329
- }
4330
- ]
4331
- },
4332
- {
4445
+ "pattern": "^quote:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
4446
+ }
4447
+ },
4448
+ "txHash": {
4449
+ "anyOf": [
4450
+ {
4451
+ "type": "string"
4452
+ },
4453
+ {
4454
+ "type": "null"
4455
+ }
4456
+ ]
4457
+ },
4458
+ "intentHashes": {
4459
+ "type": "array",
4460
+ "items": {
4333
4461
  "type": "string",
4334
- "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
4462
+ "pattern": "^0x[0-9a-fA-F]{64}$"
4335
4463
  }
4336
- ]
4337
- },
4338
- {
4339
- "type": "null"
4340
- }
4341
- ]
4342
- },
4343
- "source": {
4344
- "type": "object",
4345
- "properties": {
4346
- "status": {
4347
- "type": "string",
4348
- "enum": [
4349
- "pending",
4350
- "completed"
4351
- ]
4464
+ },
4465
+ "state": {
4466
+ "type": "string",
4467
+ "enum": [
4468
+ "pending",
4469
+ "submitted",
4470
+ "published",
4471
+ "failed"
4472
+ ]
4473
+ }
4352
4474
  },
4475
+ "required": [
4476
+ "chainId",
4477
+ "quoteIds",
4478
+ "txHash",
4479
+ "intentHashes",
4480
+ "state"
4481
+ ]
4482
+ }
4483
+ },
4484
+ "sourceTx": {
4485
+ "type": "object",
4486
+ "properties": {
4353
4487
  "chainId": {
4354
- "anyOf": [
4355
- {
4356
- "type": "integer",
4357
- "exclusiveMinimum": 0,
4358
- "maximum": 9007199254740991
4359
- },
4360
- {
4361
- "type": "null"
4362
- }
4363
- ]
4488
+ "type": "integer",
4489
+ "exclusiveMinimum": 0,
4490
+ "maximum": 9007199254740991
4364
4491
  },
4365
4492
  "txHash": {
4366
- "anyOf": [
4367
- {
4368
- "anyOf": [
4369
- {
4370
- "type": "string",
4371
- "pattern": "^0x[0-9a-fA-F]{64}$"
4372
- },
4373
- {
4374
- "type": "string",
4375
- "pattern": "^[0-9a-fA-F]{64}$"
4376
- },
4377
- {
4378
- "type": "string",
4379
- "pattern": "^[1-9A-HJ-NP-Za-km-z]{64,88}$"
4380
- }
4381
- ]
4382
- },
4383
- {
4384
- "type": "null"
4385
- }
4386
- ]
4387
- },
4388
- "timestamp": {
4389
- "anyOf": [
4390
- {
4391
- "type": "integer",
4392
- "minimum": 0,
4393
- "maximum": 4102444800
4394
- },
4395
- {
4396
- "type": "null"
4397
- }
4398
- ]
4493
+ "type": "string",
4494
+ "minLength": 1
4399
4495
  },
4400
4496
  "token": {
4401
- "anyOf": [
4402
- {
4403
- "type": "object",
4404
- "properties": {
4405
- "type": {
4406
- "type": "string",
4407
- "enum": [
4408
- "native",
4409
- "token",
4410
- "hypercore_perps",
4411
- "hypercore_spot"
4412
- ]
4413
- },
4414
- "address": {
4415
- "anyOf": [
4416
- {
4417
- "type": "string",
4418
- "minLength": 1
4419
- },
4420
- {
4421
- "type": "null"
4422
- }
4423
- ]
4424
- },
4425
- "symbol": {
4426
- "anyOf": [
4427
- {
4428
- "type": "string"
4429
- },
4430
- {
4431
- "type": "null"
4432
- }
4433
- ]
4434
- },
4435
- "decimals": {
4436
- "anyOf": [
4437
- {
4438
- "type": "integer",
4439
- "minimum": 0,
4440
- "maximum": 9007199254740991
4441
- },
4442
- {
4443
- "type": "null"
4444
- }
4445
- ]
4446
- }
4447
- },
4448
- "required": [
4449
- "type",
4450
- "address",
4451
- "symbol",
4452
- "decimals"
4453
- ],
4454
- "description": "A token. `address` is null exactly when `type` is `native`."
4455
- },
4456
- {
4457
- "type": "null"
4458
- }
4459
- ]
4497
+ "type": "string",
4498
+ "minLength": 1
4460
4499
  },
4461
4500
  "amount": {
4462
- "anyOf": [
4463
- {
4464
- "type": "string",
4465
- "maxLength": 78,
4466
- "pattern": "^(0|[1-9]\\d*)$",
4467
- "description": "Base-10 unsigned integer string in smallest units; must be greater than 0"
4468
- },
4469
- {
4470
- "type": "null"
4471
- }
4472
- ]
4501
+ "type": "string",
4502
+ "maxLength": 78,
4503
+ "pattern": "^(0|[1-9]\\d*)$"
4473
4504
  },
4474
- "sender": {
4475
- "anyOf": [
4476
- {
4477
- "anyOf": [
4478
- {
4479
- "type": "string",
4480
- "pattern": "^0x[0-9a-fA-F]{40}$"
4481
- },
4482
- {
4483
- "anyOf": [
4484
- {
4485
- "type": "string",
4486
- "pattern": "^T[1-9A-HJ-NP-Za-km-z]{33}$"
4487
- },
4488
- {
4489
- "type": "string",
4490
- "pattern": "^0x41[0-9a-fA-F]{40}$"
4491
- }
4492
- ]
4493
- },
4494
- {
4495
- "type": "string",
4496
- "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
4497
- }
4498
- ]
4499
- },
4500
- {
4501
- "type": "null"
4502
- }
4503
- ]
4505
+ "timestamp": {
4506
+ "type": "integer",
4507
+ "minimum": 0,
4508
+ "maximum": 4102444800
4509
+ },
4510
+ "symbol": {
4511
+ "type": "string",
4512
+ "minLength": 1
4513
+ },
4514
+ "decimals": {
4515
+ "type": "integer",
4516
+ "minimum": 0,
4517
+ "maximum": 9007199254740991
4504
4518
  }
4505
4519
  },
4506
4520
  "required": [
4507
- "status",
4508
4521
  "chainId",
4509
4522
  "txHash",
4510
- "timestamp",
4511
4523
  "token",
4512
- "amount",
4513
- "sender"
4514
- ],
4515
- "description": "Where the transfer was funded. A pending side has null txHash, timestamp and amount; a completed side may have a null txHash when several payments funded it."
4524
+ "amount"
4525
+ ]
4516
4526
  },
4517
- "destination": {
4527
+ "destinationTx": {
4518
4528
  "type": "object",
4519
4529
  "properties": {
4520
- "status": {
4521
- "type": "string",
4522
- "enum": [
4523
- "pending",
4524
- "completed"
4525
- ]
4526
- },
4527
4530
  "chainId": {
4528
- "anyOf": [
4529
- {
4530
- "type": "integer",
4531
- "exclusiveMinimum": 0,
4532
- "maximum": 9007199254740991
4533
- },
4534
- {
4535
- "type": "null"
4536
- }
4537
- ]
4531
+ "type": "integer",
4532
+ "exclusiveMinimum": 0,
4533
+ "maximum": 9007199254740991
4538
4534
  },
4539
4535
  "txHash": {
4540
- "anyOf": [
4541
- {
4542
- "anyOf": [
4543
- {
4544
- "type": "string",
4545
- "pattern": "^0x[0-9a-fA-F]{64}$"
4546
- },
4547
- {
4548
- "type": "string",
4549
- "pattern": "^[0-9a-fA-F]{64}$"
4550
- },
4551
- {
4552
- "type": "string",
4553
- "pattern": "^[1-9A-HJ-NP-Za-km-z]{64,88}$"
4554
- }
4555
- ]
4556
- },
4557
- {
4558
- "type": "null"
4559
- }
4560
- ]
4561
- },
4562
- "timestamp": {
4563
- "anyOf": [
4564
- {
4565
- "type": "integer",
4566
- "minimum": 0,
4567
- "maximum": 4102444800
4568
- },
4569
- {
4570
- "type": "null"
4571
- }
4572
- ]
4573
- },
4574
- "token": {
4575
- "anyOf": [
4576
- {
4577
- "type": "object",
4578
- "properties": {
4579
- "type": {
4580
- "type": "string",
4581
- "enum": [
4582
- "native",
4583
- "token",
4584
- "hypercore_perps",
4585
- "hypercore_spot"
4586
- ]
4587
- },
4588
- "address": {
4589
- "anyOf": [
4590
- {
4591
- "type": "string",
4592
- "minLength": 1
4593
- },
4594
- {
4595
- "type": "null"
4596
- }
4597
- ]
4598
- },
4599
- "symbol": {
4600
- "anyOf": [
4601
- {
4602
- "type": "string"
4603
- },
4604
- {
4605
- "type": "null"
4606
- }
4607
- ]
4608
- },
4609
- "decimals": {
4610
- "anyOf": [
4611
- {
4612
- "type": "integer",
4613
- "minimum": 0,
4614
- "maximum": 9007199254740991
4615
- },
4616
- {
4617
- "type": "null"
4618
- }
4619
- ]
4620
- }
4621
- },
4622
- "required": [
4623
- "type",
4624
- "address",
4625
- "symbol",
4626
- "decimals"
4627
- ],
4628
- "description": "A token. `address` is null exactly when `type` is `native`."
4629
- },
4630
- {
4631
- "type": "null"
4632
- }
4633
- ]
4634
- },
4635
- "amount": {
4636
- "anyOf": [
4637
- {
4638
- "type": "string",
4639
- "maxLength": 78,
4640
- "pattern": "^(0|[1-9]\\d*)$",
4641
- "description": "Base-10 unsigned integer string in smallest units; must be greater than 0"
4642
- },
4643
- {
4644
- "type": "null"
4645
- }
4646
- ]
4536
+ "type": "string",
4537
+ "minLength": 1
4647
4538
  },
4648
- "recipient": {
4649
- "anyOf": [
4650
- {
4651
- "anyOf": [
4652
- {
4653
- "type": "string",
4654
- "pattern": "^0x[0-9a-fA-F]{40}$"
4655
- },
4656
- {
4657
- "anyOf": [
4658
- {
4659
- "type": "string",
4660
- "pattern": "^T[1-9A-HJ-NP-Za-km-z]{33}$"
4661
- },
4662
- {
4663
- "type": "string",
4664
- "pattern": "^0x41[0-9a-fA-F]{40}$"
4665
- }
4666
- ]
4667
- },
4668
- {
4669
- "type": "string",
4670
- "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
4671
- }
4672
- ]
4673
- },
4674
- {
4675
- "type": "null"
4676
- }
4677
- ]
4539
+ "token": {
4540
+ "type": "string",
4541
+ "minLength": 1
4542
+ },
4543
+ "amount": {
4544
+ "type": "string",
4545
+ "maxLength": 78,
4546
+ "pattern": "^(0|[1-9]\\d*)$"
4547
+ },
4548
+ "timestamp": {
4549
+ "type": "integer",
4550
+ "minimum": 0,
4551
+ "maximum": 4102444800
4552
+ },
4553
+ "symbol": {
4554
+ "type": "string",
4555
+ "minLength": 1
4556
+ },
4557
+ "decimals": {
4558
+ "type": "integer",
4559
+ "minimum": 0,
4560
+ "maximum": 9007199254740991
4678
4561
  }
4679
4562
  },
4680
4563
  "required": [
4681
- "status",
4682
4564
  "chainId",
4683
4565
  "txHash",
4684
- "timestamp",
4685
4566
  "token",
4686
- "amount",
4687
- "recipient"
4688
- ],
4689
- "description": "Where the transfer was (or will be) delivered; on a refund, where it was returned. A pending side has null txHash, timestamp and amount."
4567
+ "amount"
4568
+ ]
4690
4569
  },
4691
4570
  "steps": {
4692
4571
  "type": "array",
4693
4572
  "items": {
4694
4573
  "type": "object",
4695
4574
  "properties": {
4696
- "id": {
4697
- "type": "string",
4698
- "minLength": 1
4699
- },
4700
4575
  "type": {
4701
4576
  "type": "string",
4702
4577
  "enum": [
4703
- "swap",
4704
- "bridge",
4705
- "transfer",
4706
- "call",
4707
- "refund"
4578
+ "SWAP",
4579
+ "BRIDGE"
4708
4580
  ]
4709
4581
  },
4710
- "provider": {
4711
- "anyOf": [
4712
- {
4582
+ "intentHash": {
4583
+ "type": "string",
4584
+ "pattern": "^0x[0-9a-fA-F]{64}$"
4585
+ },
4586
+ "status": {
4587
+ "type": "string",
4588
+ "minLength": 1
4589
+ },
4590
+ "from": {
4591
+ "type": "object",
4592
+ "properties": {
4593
+ "token": {
4713
4594
  "type": "string",
4714
4595
  "minLength": 1
4715
4596
  },
4716
- {
4717
- "type": "null"
4597
+ "amount": {
4598
+ "type": "string",
4599
+ "maxLength": 78,
4600
+ "pattern": "^(0|[1-9]\\d*)$"
4601
+ },
4602
+ "chainId": {
4603
+ "type": "integer",
4604
+ "exclusiveMinimum": 0,
4605
+ "maximum": 9007199254740991
4718
4606
  }
4607
+ },
4608
+ "required": [
4609
+ "token",
4610
+ "amount",
4611
+ "chainId"
4719
4612
  ]
4720
4613
  },
4721
- "relatedIntents": {
4722
- "type": "array",
4723
- "items": {
4724
- "type": "object",
4725
- "properties": {
4726
- "chainId": {
4727
- "type": "integer",
4728
- "exclusiveMinimum": 0,
4729
- "maximum": 9007199254740991
4730
- },
4731
- "intentHash": {
4732
- "type": "string",
4733
- "pattern": "^0x[0-9a-fA-F]{64}$"
4734
- },
4735
- "status": {
4736
- "type": "string",
4737
- "enum": [
4738
- "pending",
4739
- "completed"
4740
- ]
4741
- },
4742
- "substatus": {
4743
- "type": "string",
4744
- "enum": [
4745
- "waiting_for_funding",
4746
- "waiting_for_fulfillment",
4747
- "waiting_for_refund",
4748
- "fulfilled",
4749
- "refunded"
4750
- ]
4751
- }
4614
+ "to": {
4615
+ "type": "object",
4616
+ "properties": {
4617
+ "token": {
4618
+ "type": "string",
4619
+ "minLength": 1
4752
4620
  },
4753
- "required": [
4754
- "chainId",
4755
- "intentHash",
4756
- "status",
4757
- "substatus"
4758
- ],
4759
- "description": "An intent behind a step. Its pair reflects the intent itself, not delivery: a fulfilled burn is completed/fulfilled. Only the five allowed status/substatus pairs occur."
4760
- }
4761
- },
4762
- "status": {
4763
- "type": "string",
4764
- "enum": [
4765
- "pending",
4766
- "completed"
4767
- ]
4768
- },
4769
- "substatus": {
4770
- "type": "string",
4771
- "enum": [
4772
- "waiting_for_funding",
4773
- "waiting_for_fulfillment",
4774
- "waiting_for_refund",
4775
- "fulfilled",
4776
- "refunded"
4777
- ]
4778
- },
4779
- "transactions": {
4780
- "type": "array",
4781
- "items": {
4782
- "type": "object",
4783
- "properties": {
4784
- "chainId": {
4785
- "type": "integer",
4786
- "exclusiveMinimum": 0,
4787
- "maximum": 9007199254740991
4788
- },
4789
- "txHash": {
4790
- "anyOf": [
4791
- {
4792
- "type": "string",
4793
- "pattern": "^0x[0-9a-fA-F]{64}$"
4794
- },
4795
- {
4796
- "type": "string",
4797
- "pattern": "^[0-9a-fA-F]{64}$"
4798
- },
4799
- {
4800
- "type": "string",
4801
- "pattern": "^[1-9A-HJ-NP-Za-km-z]{64,88}$"
4802
- }
4803
- ]
4804
- },
4805
- "txLink": {
4806
- "anyOf": [
4807
- {
4808
- "type": "string",
4809
- "format": "uri"
4810
- },
4811
- {
4812
- "type": "null"
4813
- }
4814
- ]
4815
- },
4816
- "timestamp": {
4817
- "anyOf": [
4818
- {
4819
- "type": "integer",
4820
- "minimum": 0,
4821
- "maximum": 4102444800
4822
- },
4823
- {
4824
- "type": "null"
4825
- }
4826
- ]
4827
- },
4828
- "type": {
4829
- "type": "string",
4830
- "enum": [
4831
- "funding",
4832
- "burn",
4833
- "mint",
4834
- "execution",
4835
- "refund"
4836
- ]
4837
- },
4838
- "sender": {
4839
- "anyOf": [
4840
- {
4841
- "anyOf": [
4842
- {
4843
- "type": "string",
4844
- "pattern": "^0x[0-9a-fA-F]{40}$"
4845
- },
4846
- {
4847
- "anyOf": [
4848
- {
4849
- "type": "string",
4850
- "pattern": "^T[1-9A-HJ-NP-Za-km-z]{33}$"
4851
- },
4852
- {
4853
- "type": "string",
4854
- "pattern": "^0x41[0-9a-fA-F]{40}$"
4855
- }
4856
- ]
4857
- },
4858
- {
4859
- "type": "string",
4860
- "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
4861
- }
4862
- ]
4863
- },
4864
- {
4865
- "type": "null"
4866
- }
4867
- ]
4868
- },
4869
- "recipient": {
4870
- "anyOf": [
4871
- {
4872
- "anyOf": [
4873
- {
4874
- "type": "string",
4875
- "pattern": "^0x[0-9a-fA-F]{40}$"
4876
- },
4877
- {
4878
- "anyOf": [
4879
- {
4880
- "type": "string",
4881
- "pattern": "^T[1-9A-HJ-NP-Za-km-z]{33}$"
4882
- },
4883
- {
4884
- "type": "string",
4885
- "pattern": "^0x41[0-9a-fA-F]{40}$"
4886
- }
4887
- ]
4888
- },
4889
- {
4890
- "type": "string",
4891
- "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
4892
- }
4893
- ]
4894
- },
4895
- {
4896
- "type": "null"
4897
- }
4898
- ]
4899
- },
4900
- "token": {
4901
- "anyOf": [
4902
- {
4903
- "type": "object",
4904
- "properties": {
4905
- "type": {
4906
- "type": "string",
4907
- "enum": [
4908
- "native",
4909
- "token",
4910
- "hypercore_perps",
4911
- "hypercore_spot"
4912
- ]
4913
- },
4914
- "address": {
4915
- "anyOf": [
4916
- {
4917
- "type": "string",
4918
- "minLength": 1
4919
- },
4920
- {
4921
- "type": "null"
4922
- }
4923
- ]
4924
- },
4925
- "symbol": {
4926
- "anyOf": [
4927
- {
4928
- "type": "string"
4929
- },
4930
- {
4931
- "type": "null"
4932
- }
4933
- ]
4934
- },
4935
- "decimals": {
4936
- "anyOf": [
4937
- {
4938
- "type": "integer",
4939
- "minimum": 0,
4940
- "maximum": 9007199254740991
4941
- },
4942
- {
4943
- "type": "null"
4944
- }
4945
- ]
4946
- }
4947
- },
4948
- "required": [
4949
- "type",
4950
- "address",
4951
- "symbol",
4952
- "decimals"
4953
- ],
4954
- "description": "A token. `address` is null exactly when `type` is `native`."
4955
- },
4956
- {
4957
- "type": "null"
4958
- }
4959
- ]
4621
+ "amount": {
4622
+ "type": "string",
4623
+ "maxLength": 78,
4624
+ "pattern": "^(0|[1-9]\\d*)$"
4625
+ },
4626
+ "chainId": {
4627
+ "type": "integer",
4628
+ "exclusiveMinimum": 0,
4629
+ "maximum": 9007199254740991
4630
+ }
4631
+ },
4632
+ "required": [
4633
+ "token",
4634
+ "amount",
4635
+ "chainId"
4636
+ ]
4637
+ },
4638
+ "transactions": {
4639
+ "type": "object",
4640
+ "properties": {
4641
+ "created": {
4642
+ "type": "object",
4643
+ "properties": {
4644
+ "chainId": {
4645
+ "type": "integer",
4646
+ "exclusiveMinimum": 0,
4647
+ "maximum": 9007199254740991
4648
+ },
4649
+ "txHash": {
4650
+ "type": "string",
4651
+ "minLength": 1
4652
+ },
4653
+ "timestamp": {
4654
+ "type": "integer",
4655
+ "minimum": 0,
4656
+ "maximum": 4102444800
4657
+ },
4658
+ "token": {
4659
+ "type": "string",
4660
+ "minLength": 1
4661
+ },
4662
+ "amount": {
4663
+ "type": "string",
4664
+ "maxLength": 78,
4665
+ "pattern": "^(0|[1-9]\\d*)$"
4666
+ }
4960
4667
  },
4961
- "amount": {
4962
- "anyOf": [
4963
- {
4964
- "type": "string",
4965
- "maxLength": 78,
4966
- "pattern": "^(0|[1-9]\\d*)$",
4967
- "description": "Base-10 unsigned integer string in smallest units; must be greater than 0"
4968
- },
4969
- {
4970
- "type": "null"
4971
- }
4972
- ]
4973
- }
4668
+ "required": [
4669
+ "chainId",
4670
+ "txHash"
4671
+ ]
4974
4672
  },
4975
- "required": [
4976
- "chainId",
4977
- "txHash",
4978
- "txLink",
4979
- "timestamp",
4980
- "type",
4981
- "sender",
4982
- "recipient",
4983
- "token",
4984
- "amount"
4985
- ],
4986
- "description": "A transaction of a step. `txLink` is a block-explorer URL when one is known."
4673
+ "fulfilled": {
4674
+ "type": "object",
4675
+ "properties": {
4676
+ "chainId": {
4677
+ "type": "integer",
4678
+ "exclusiveMinimum": 0,
4679
+ "maximum": 9007199254740991
4680
+ },
4681
+ "txHash": {
4682
+ "type": "string",
4683
+ "minLength": 1
4684
+ },
4685
+ "timestamp": {
4686
+ "type": "integer",
4687
+ "minimum": 0,
4688
+ "maximum": 4102444800
4689
+ },
4690
+ "token": {
4691
+ "type": "string",
4692
+ "minLength": 1
4693
+ },
4694
+ "amount": {
4695
+ "type": "string",
4696
+ "maxLength": 78,
4697
+ "pattern": "^(0|[1-9]\\d*)$"
4698
+ }
4699
+ },
4700
+ "required": [
4701
+ "chainId",
4702
+ "txHash"
4703
+ ]
4704
+ },
4705
+ "refunded": {
4706
+ "type": "object",
4707
+ "properties": {
4708
+ "chainId": {
4709
+ "type": "integer",
4710
+ "exclusiveMinimum": 0,
4711
+ "maximum": 9007199254740991
4712
+ },
4713
+ "txHash": {
4714
+ "type": "string",
4715
+ "minLength": 1
4716
+ },
4717
+ "timestamp": {
4718
+ "type": "integer",
4719
+ "minimum": 0,
4720
+ "maximum": 4102444800
4721
+ },
4722
+ "token": {
4723
+ "type": "string",
4724
+ "minLength": 1
4725
+ },
4726
+ "amount": {
4727
+ "type": "string",
4728
+ "maxLength": 78,
4729
+ "pattern": "^(0|[1-9]\\d*)$"
4730
+ }
4731
+ },
4732
+ "required": [
4733
+ "chainId",
4734
+ "txHash"
4735
+ ]
4736
+ }
4987
4737
  }
4988
4738
  }
4989
4739
  },
4990
4740
  "required": [
4991
- "id",
4992
4741
  "type",
4993
- "provider",
4994
- "relatedIntents",
4742
+ "intentHash",
4995
4743
  "status",
4996
- "substatus",
4744
+ "from",
4745
+ "to",
4997
4746
  "transactions"
4998
- ],
4999
- "description": "One step of the transfer. `id` is `<type>-<n>`, counting steps of that type from 1. Only the five allowed status/substatus pairs occur."
4747
+ ]
5000
4748
  }
4749
+ },
4750
+ "createdAt": {
4751
+ "type": "integer",
4752
+ "minimum": 0,
4753
+ "maximum": 4102444800
4754
+ },
4755
+ "refundAddress": {
4756
+ "anyOf": [
4757
+ {
4758
+ "type": "string",
4759
+ "pattern": "^0x[0-9a-fA-F]{40}$"
4760
+ },
4761
+ {
4762
+ "anyOf": [
4763
+ {
4764
+ "type": "string",
4765
+ "pattern": "^T[1-9A-HJ-NP-Za-km-z]{33}$"
4766
+ },
4767
+ {
4768
+ "type": "string",
4769
+ "pattern": "^0x41[0-9a-fA-F]{40}$"
4770
+ }
4771
+ ]
4772
+ },
4773
+ {
4774
+ "type": "string",
4775
+ "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
4776
+ }
4777
+ ]
5001
4778
  }
5002
4779
  },
5003
4780
  "required": [
5004
4781
  "id",
4782
+ "type",
5005
4783
  "status",
5006
- "substatus",
5007
- "createdAt",
5008
- "updatedAt",
5009
- "refundAddress",
5010
- "source",
5011
- "destination",
5012
- "steps"
5013
- ],
5014
- "description": "One transfer. `id` is the prefixed quote id, or null when the transfer is not linked to a quote. Only the five allowed status/substatus pairs occur: pending/waiting_for_funding, pending/waiting_for_fulfillment, pending/waiting_for_refund, completed/fulfilled, completed/refunded."
4784
+ "updatedAt"
4785
+ ]
5015
4786
  }
5016
4787
  },
5017
- "nextPage": {
4788
+ "nextCursor": {
5018
4789
  "anyOf": [
5019
4790
  {
5020
- "type": "integer",
5021
- "minimum": 2,
5022
- "maximum": 9007199254740991
4791
+ "type": "string",
4792
+ "minLength": 1
5023
4793
  },
5024
4794
  {
5025
4795
  "type": "null"
@@ -5029,9 +4799,8 @@
5029
4799
  },
5030
4800
  "required": [
5031
4801
  "results",
5032
- "nextPage"
5033
- ],
5034
- "description": "A page of transfers. `nextPage` is null on the last page, otherwise an integer >= 2."
4802
+ "nextCursor"
4803
+ ]
5035
4804
  }
5036
4805
  }
5037
4806
  }
@@ -5230,6 +4999,20 @@
5230
4999
  "type": "string",
5231
5000
  "maxLength": 78,
5232
5001
  "pattern": "^(0|[1-9]\\d*)$"
5002
+ },
5003
+ "timestamp": {
5004
+ "type": "integer",
5005
+ "minimum": 0,
5006
+ "maximum": 4102444800
5007
+ },
5008
+ "symbol": {
5009
+ "type": "string",
5010
+ "minLength": 1
5011
+ },
5012
+ "decimals": {
5013
+ "type": "integer",
5014
+ "minimum": 0,
5015
+ "maximum": 9007199254740991
5233
5016
  }
5234
5017
  },
5235
5018
  "required": [
@@ -5259,6 +5042,20 @@
5259
5042
  "type": "string",
5260
5043
  "maxLength": 78,
5261
5044
  "pattern": "^(0|[1-9]\\d*)$"
5045
+ },
5046
+ "timestamp": {
5047
+ "type": "integer",
5048
+ "minimum": 0,
5049
+ "maximum": 4102444800
5050
+ },
5051
+ "symbol": {
5052
+ "type": "string",
5053
+ "minLength": 1
5054
+ },
5055
+ "decimals": {
5056
+ "type": "integer",
5057
+ "minimum": 0,
5058
+ "maximum": 9007199254740991
5262
5059
  }
5263
5060
  },
5264
5061
  "required": [
@@ -5350,6 +5147,20 @@
5350
5147
  "txHash": {
5351
5148
  "type": "string",
5352
5149
  "minLength": 1
5150
+ },
5151
+ "timestamp": {
5152
+ "type": "integer",
5153
+ "minimum": 0,
5154
+ "maximum": 4102444800
5155
+ },
5156
+ "token": {
5157
+ "type": "string",
5158
+ "minLength": 1
5159
+ },
5160
+ "amount": {
5161
+ "type": "string",
5162
+ "maxLength": 78,
5163
+ "pattern": "^(0|[1-9]\\d*)$"
5353
5164
  }
5354
5165
  },
5355
5166
  "required": [
@@ -5368,6 +5179,20 @@
5368
5179
  "txHash": {
5369
5180
  "type": "string",
5370
5181
  "minLength": 1
5182
+ },
5183
+ "timestamp": {
5184
+ "type": "integer",
5185
+ "minimum": 0,
5186
+ "maximum": 4102444800
5187
+ },
5188
+ "token": {
5189
+ "type": "string",
5190
+ "minLength": 1
5191
+ },
5192
+ "amount": {
5193
+ "type": "string",
5194
+ "maxLength": 78,
5195
+ "pattern": "^(0|[1-9]\\d*)$"
5371
5196
  }
5372
5197
  },
5373
5198
  "required": [
@@ -5386,6 +5211,20 @@
5386
5211
  "txHash": {
5387
5212
  "type": "string",
5388
5213
  "minLength": 1
5214
+ },
5215
+ "timestamp": {
5216
+ "type": "integer",
5217
+ "minimum": 0,
5218
+ "maximum": 4102444800
5219
+ },
5220
+ "token": {
5221
+ "type": "string",
5222
+ "minLength": 1
5223
+ },
5224
+ "amount": {
5225
+ "type": "string",
5226
+ "maxLength": 78,
5227
+ "pattern": "^(0|[1-9]\\d*)$"
5389
5228
  }
5390
5229
  },
5391
5230
  "required": [
@@ -5405,6 +5244,35 @@
5405
5244
  "transactions"
5406
5245
  ]
5407
5246
  }
5247
+ },
5248
+ "createdAt": {
5249
+ "type": "integer",
5250
+ "minimum": 0,
5251
+ "maximum": 4102444800
5252
+ },
5253
+ "refundAddress": {
5254
+ "anyOf": [
5255
+ {
5256
+ "type": "string",
5257
+ "pattern": "^0x[0-9a-fA-F]{40}$"
5258
+ },
5259
+ {
5260
+ "anyOf": [
5261
+ {
5262
+ "type": "string",
5263
+ "pattern": "^T[1-9A-HJ-NP-Za-km-z]{33}$"
5264
+ },
5265
+ {
5266
+ "type": "string",
5267
+ "pattern": "^0x41[0-9a-fA-F]{40}$"
5268
+ }
5269
+ ]
5270
+ },
5271
+ {
5272
+ "type": "string",
5273
+ "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
5274
+ }
5275
+ ]
5408
5276
  }
5409
5277
  },
5410
5278
  "required": [