@eco-foundation/api-schemas 0.15.0 → 0.16.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 (31) hide show
  1. package/README.md +11 -34
  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/registry.d.ts +113 -123
  13. package/dist/v1/endpoints/registry.js +3 -4
  14. package/dist/v1/endpoints/registry.js.map +1 -1
  15. package/dist/v1/endpoints/status.d.ts +70 -2
  16. package/dist/v1/endpoints/status.js +11 -1
  17. package/dist/v1/endpoints/status.js.map +1 -1
  18. package/dist/v1/index.d.ts +0 -1
  19. package/dist/v1/index.js +0 -1
  20. package/dist/v1/index.js.map +1 -1
  21. package/dist/v1/types.d.ts +8 -87
  22. package/openapi/v1.json +477 -705
  23. package/package.json +2 -1
  24. package/dist/fixtures/v1/intents-status.response.completed-fulfilled.json +0 -117
  25. package/dist/fixtures/v1/intents-status.response.completed-refunded.json +0 -101
  26. package/dist/fixtures/v1/intents-status.response.empty.json +0 -13
  27. package/dist/fixtures/v1/intents-status.response.pending-fulfillment.json +0 -101
  28. package/dist/fixtures/v1/intents-status.response.unlinked-intent.json +0 -81
  29. package/dist/v1/endpoints/transfer-status.d.ts +0 -488
  30. package/dist/v1/endpoints/transfer-status.js +0 -197
  31. package/dist/v1/endpoints/transfer-status.js.map +0 -1
package/openapi/v1.json CHANGED
@@ -4118,18 +4118,26 @@
4118
4118
  "/v1/intents/status": {
4119
4119
  "get": {
4120
4120
  "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.",
4121
+ "summary": "Track intents, quotes and solver gasless jobs. Always 200; an unknown exact id reports status \"unknown\".",
4122
4122
  "tags": [
4123
4123
  "status",
4124
4124
  "stable"
4125
4125
  ],
4126
4126
  "parameters": [
4127
4127
  {
4128
- "name": "txHash",
4128
+ "name": "intentHash",
4129
+ "in": "query",
4130
+ "required": false,
4131
+ "schema": {
4132
+ "type": "string",
4133
+ "pattern": "^0x[0-9a-fA-F]{64}$"
4134
+ }
4135
+ },
4136
+ {
4137
+ "name": "sourceTxHash",
4129
4138
  "in": "query",
4130
4139
  "required": false,
4131
4140
  "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
4141
  "anyOf": [
4134
4142
  {
4135
4143
  "type": "string",
@@ -4147,13 +4155,45 @@
4147
4155
  }
4148
4156
  },
4149
4157
  {
4150
- "name": "intentHash",
4158
+ "name": "destinationTxHash",
4151
4159
  "in": "query",
4152
4160
  "required": false,
4153
4161
  "schema": {
4154
- "description": "An intent hash.",
4155
- "type": "string",
4156
- "pattern": "^0x[0-9a-fA-F]{64}$"
4162
+ "anyOf": [
4163
+ {
4164
+ "type": "string",
4165
+ "pattern": "^0x[0-9a-fA-F]{64}$"
4166
+ },
4167
+ {
4168
+ "type": "string",
4169
+ "pattern": "^[0-9a-fA-F]{64}$"
4170
+ },
4171
+ {
4172
+ "type": "string",
4173
+ "pattern": "^[1-9A-HJ-NP-Za-km-z]{64,88}$"
4174
+ }
4175
+ ]
4176
+ }
4177
+ },
4178
+ {
4179
+ "name": "txHash",
4180
+ "in": "query",
4181
+ "required": false,
4182
+ "schema": {
4183
+ "anyOf": [
4184
+ {
4185
+ "type": "string",
4186
+ "pattern": "^0x[0-9a-fA-F]{64}$"
4187
+ },
4188
+ {
4189
+ "type": "string",
4190
+ "pattern": "^[0-9a-fA-F]{64}$"
4191
+ },
4192
+ {
4193
+ "type": "string",
4194
+ "pattern": "^[1-9A-HJ-NP-Za-km-z]{64,88}$"
4195
+ }
4196
+ ]
4157
4197
  }
4158
4198
  },
4159
4199
  {
@@ -4161,7 +4201,6 @@
4161
4201
  "in": "query",
4162
4202
  "required": false,
4163
4203
  "schema": {
4164
- "description": "A quote id: a bare uuid, `quote:<uuid>` or `quoteResponse:<uuid>`.",
4165
4204
  "anyOf": [
4166
4205
  {
4167
4206
  "type": "string",
@@ -4171,10 +4210,6 @@
4171
4210
  {
4172
4211
  "type": "string",
4173
4212
  "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
4213
  }
4179
4214
  ]
4180
4215
  }
@@ -4184,7 +4219,6 @@
4184
4219
  "in": "query",
4185
4220
  "required": false,
4186
4221
  "schema": {
4187
- "description": "A submit job id.",
4188
4222
  "type": "string",
4189
4223
  "format": "uuid",
4190
4224
  "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 +4229,35 @@
4195
4229
  "in": "query",
4196
4230
  "required": false,
4197
4231
  "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
- }
4232
+ "type": "string",
4233
+ "minLength": 1
4234
+ }
4235
+ },
4236
+ {
4237
+ "name": "status",
4238
+ "in": "query",
4239
+ "required": false,
4240
+ "schema": {
4241
+ "type": "string",
4242
+ "enum": [
4243
+ "pending",
4244
+ "filled",
4245
+ "settled",
4246
+ "refunded",
4247
+ "refundable",
4248
+ "expired",
4249
+ "failed",
4250
+ "unknown"
4220
4251
  ]
4221
4252
  }
4222
4253
  },
4223
4254
  {
4224
- "name": "page",
4255
+ "name": "cursor",
4225
4256
  "in": "query",
4226
4257
  "required": false,
4227
4258
  "schema": {
4228
- "description": "Page number, default 1.",
4229
- "type": "integer",
4230
- "minimum": 1,
4231
- "maximum": 9007199254740991
4259
+ "type": "string",
4260
+ "minLength": 1
4232
4261
  }
4233
4262
  },
4234
4263
  {
@@ -4236,7 +4265,7 @@
4236
4265
  "in": "query",
4237
4266
  "required": false,
4238
4267
  "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.",
4268
+ "default": 20,
4240
4269
  "type": "integer",
4241
4270
  "minimum": 1,
4242
4271
  "maximum": 50
@@ -4258,34 +4287,23 @@
4258
4287
  "type": "object",
4259
4288
  "properties": {
4260
4289
  "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
- ]
4290
+ "type": "string",
4291
+ "minLength": 1
4270
4292
  },
4271
- "status": {
4293
+ "type": {
4272
4294
  "type": "string",
4273
4295
  "enum": [
4274
- "pending",
4275
- "completed"
4296
+ "intent",
4297
+ "quote",
4298
+ "gasless",
4299
+ "deposit-address"
4276
4300
  ]
4277
4301
  },
4278
- "substatus": {
4302
+ "status": {
4279
4303
  "type": "string",
4280
- "enum": [
4281
- "waiting_for_funding",
4282
- "waiting_for_fulfillment",
4283
- "waiting_for_refund",
4284
- "fulfilled",
4285
- "refunded"
4286
- ]
4304
+ "minLength": 1
4287
4305
  },
4288
- "createdAt": {
4306
+ "updatedAt": {
4289
4307
  "anyOf": [
4290
4308
  {
4291
4309
  "type": "integer",
@@ -4297,729 +4315,385 @@
4297
4315
  }
4298
4316
  ]
4299
4317
  },
4300
- "updatedAt": {
4318
+ "intentHashes": {
4319
+ "type": "array",
4320
+ "items": {
4321
+ "type": "string",
4322
+ "pattern": "^0x[0-9a-fA-F]{64}$"
4323
+ }
4324
+ },
4325
+ "txHash": {
4301
4326
  "anyOf": [
4302
4327
  {
4303
- "type": "integer",
4304
- "minimum": 0,
4305
- "maximum": 4102444800
4328
+ "type": "string"
4306
4329
  },
4307
4330
  {
4308
4331
  "type": "null"
4309
4332
  }
4310
4333
  ]
4311
4334
  },
4312
- "refundAddress": {
4313
- "anyOf": [
4314
- {
4315
- "anyOf": [
4316
- {
4335
+ "subStatuses": {
4336
+ "type": "array",
4337
+ "items": {
4338
+ "type": "object",
4339
+ "properties": {
4340
+ "chainId": {
4341
+ "type": "integer",
4342
+ "exclusiveMinimum": 0,
4343
+ "maximum": 9007199254740991
4344
+ },
4345
+ "quoteIds": {
4346
+ "type": "array",
4347
+ "items": {
4317
4348
  "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
- {
4349
+ "pattern": "^quote:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
4350
+ }
4351
+ },
4352
+ "txHash": {
4353
+ "anyOf": [
4354
+ {
4355
+ "type": "string"
4356
+ },
4357
+ {
4358
+ "type": "null"
4359
+ }
4360
+ ]
4361
+ },
4362
+ "intentHashes": {
4363
+ "type": "array",
4364
+ "items": {
4333
4365
  "type": "string",
4334
- "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
4366
+ "pattern": "^0x[0-9a-fA-F]{64}$"
4335
4367
  }
4336
- ]
4368
+ },
4369
+ "state": {
4370
+ "type": "string",
4371
+ "enum": [
4372
+ "pending",
4373
+ "submitted",
4374
+ "published",
4375
+ "failed"
4376
+ ]
4377
+ }
4337
4378
  },
4338
- {
4339
- "type": "null"
4340
- }
4341
- ]
4379
+ "required": [
4380
+ "chainId",
4381
+ "quoteIds",
4382
+ "txHash",
4383
+ "intentHashes",
4384
+ "state"
4385
+ ]
4386
+ }
4342
4387
  },
4343
- "source": {
4388
+ "sourceTx": {
4344
4389
  "type": "object",
4345
4390
  "properties": {
4346
- "status": {
4347
- "type": "string",
4348
- "enum": [
4349
- "pending",
4350
- "completed"
4351
- ]
4352
- },
4353
4391
  "chainId": {
4354
- "anyOf": [
4355
- {
4356
- "type": "integer",
4357
- "exclusiveMinimum": 0,
4358
- "maximum": 9007199254740991
4359
- },
4360
- {
4361
- "type": "null"
4362
- }
4363
- ]
4392
+ "type": "integer",
4393
+ "exclusiveMinimum": 0,
4394
+ "maximum": 9007199254740991
4364
4395
  },
4365
4396
  "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
- ]
4397
+ "type": "string",
4398
+ "minLength": 1
4399
4399
  },
4400
4400
  "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
- ]
4401
+ "type": "string",
4402
+ "minLength": 1
4460
4403
  },
4461
4404
  "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
- ]
4405
+ "type": "string",
4406
+ "maxLength": 78,
4407
+ "pattern": "^(0|[1-9]\\d*)$"
4473
4408
  },
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
- ]
4409
+ "timestamp": {
4410
+ "type": "integer",
4411
+ "minimum": 0,
4412
+ "maximum": 4102444800
4413
+ },
4414
+ "symbol": {
4415
+ "type": "string",
4416
+ "minLength": 1
4417
+ },
4418
+ "decimals": {
4419
+ "type": "integer",
4420
+ "minimum": 0,
4421
+ "maximum": 9007199254740991
4504
4422
  }
4505
4423
  },
4506
4424
  "required": [
4507
- "status",
4508
4425
  "chainId",
4509
4426
  "txHash",
4510
- "timestamp",
4511
4427
  "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."
4428
+ "amount"
4429
+ ]
4516
4430
  },
4517
- "destination": {
4431
+ "destinationTx": {
4518
4432
  "type": "object",
4519
4433
  "properties": {
4520
- "status": {
4521
- "type": "string",
4522
- "enum": [
4523
- "pending",
4524
- "completed"
4525
- ]
4526
- },
4527
4434
  "chainId": {
4528
- "anyOf": [
4529
- {
4530
- "type": "integer",
4531
- "exclusiveMinimum": 0,
4532
- "maximum": 9007199254740991
4533
- },
4534
- {
4535
- "type": "null"
4536
- }
4537
- ]
4435
+ "type": "integer",
4436
+ "exclusiveMinimum": 0,
4437
+ "maximum": 9007199254740991
4538
4438
  },
4539
4439
  "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
- ]
4440
+ "type": "string",
4441
+ "minLength": 1
4573
4442
  },
4574
4443
  "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
- ]
4444
+ "type": "string",
4445
+ "minLength": 1
4634
4446
  },
4635
4447
  "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
- ]
4448
+ "type": "string",
4449
+ "maxLength": 78,
4450
+ "pattern": "^(0|[1-9]\\d*)$"
4647
4451
  },
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
- ]
4452
+ "timestamp": {
4453
+ "type": "integer",
4454
+ "minimum": 0,
4455
+ "maximum": 4102444800
4456
+ },
4457
+ "symbol": {
4458
+ "type": "string",
4459
+ "minLength": 1
4460
+ },
4461
+ "decimals": {
4462
+ "type": "integer",
4463
+ "minimum": 0,
4464
+ "maximum": 9007199254740991
4678
4465
  }
4679
4466
  },
4680
4467
  "required": [
4681
- "status",
4682
4468
  "chainId",
4683
4469
  "txHash",
4684
- "timestamp",
4685
4470
  "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."
4471
+ "amount"
4472
+ ]
4690
4473
  },
4691
4474
  "steps": {
4692
4475
  "type": "array",
4693
4476
  "items": {
4694
4477
  "type": "object",
4695
4478
  "properties": {
4696
- "id": {
4697
- "type": "string",
4698
- "minLength": 1
4699
- },
4700
4479
  "type": {
4701
4480
  "type": "string",
4702
4481
  "enum": [
4703
- "swap",
4704
- "bridge",
4705
- "transfer",
4706
- "call",
4707
- "refund"
4482
+ "SWAP",
4483
+ "BRIDGE"
4708
4484
  ]
4709
4485
  },
4710
- "provider": {
4711
- "anyOf": [
4712
- {
4486
+ "intentHash": {
4487
+ "type": "string",
4488
+ "pattern": "^0x[0-9a-fA-F]{64}$"
4489
+ },
4490
+ "status": {
4491
+ "type": "string",
4492
+ "minLength": 1
4493
+ },
4494
+ "from": {
4495
+ "type": "object",
4496
+ "properties": {
4497
+ "token": {
4713
4498
  "type": "string",
4714
4499
  "minLength": 1
4715
4500
  },
4716
- {
4717
- "type": "null"
4501
+ "amount": {
4502
+ "type": "string",
4503
+ "maxLength": 78,
4504
+ "pattern": "^(0|[1-9]\\d*)$"
4505
+ },
4506
+ "chainId": {
4507
+ "type": "integer",
4508
+ "exclusiveMinimum": 0,
4509
+ "maximum": 9007199254740991
4718
4510
  }
4511
+ },
4512
+ "required": [
4513
+ "token",
4514
+ "amount",
4515
+ "chainId"
4719
4516
  ]
4720
4517
  },
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
- }
4518
+ "to": {
4519
+ "type": "object",
4520
+ "properties": {
4521
+ "token": {
4522
+ "type": "string",
4523
+ "minLength": 1
4752
4524
  },
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
- ]
4525
+ "amount": {
4526
+ "type": "string",
4527
+ "maxLength": 78,
4528
+ "pattern": "^(0|[1-9]\\d*)$"
4529
+ },
4530
+ "chainId": {
4531
+ "type": "integer",
4532
+ "exclusiveMinimum": 0,
4533
+ "maximum": 9007199254740991
4534
+ }
4535
+ },
4536
+ "required": [
4537
+ "token",
4538
+ "amount",
4539
+ "chainId"
4540
+ ]
4541
+ },
4542
+ "transactions": {
4543
+ "type": "object",
4544
+ "properties": {
4545
+ "created": {
4546
+ "type": "object",
4547
+ "properties": {
4548
+ "chainId": {
4549
+ "type": "integer",
4550
+ "exclusiveMinimum": 0,
4551
+ "maximum": 9007199254740991
4552
+ },
4553
+ "txHash": {
4554
+ "type": "string",
4555
+ "minLength": 1
4556
+ },
4557
+ "timestamp": {
4558
+ "type": "integer",
4559
+ "minimum": 0,
4560
+ "maximum": 4102444800
4561
+ },
4562
+ "token": {
4563
+ "type": "string",
4564
+ "minLength": 1
4565
+ },
4566
+ "amount": {
4567
+ "type": "string",
4568
+ "maxLength": 78,
4569
+ "pattern": "^(0|[1-9]\\d*)$"
4570
+ }
4960
4571
  },
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
- }
4572
+ "required": [
4573
+ "chainId",
4574
+ "txHash"
4575
+ ]
4974
4576
  },
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."
4577
+ "fulfilled": {
4578
+ "type": "object",
4579
+ "properties": {
4580
+ "chainId": {
4581
+ "type": "integer",
4582
+ "exclusiveMinimum": 0,
4583
+ "maximum": 9007199254740991
4584
+ },
4585
+ "txHash": {
4586
+ "type": "string",
4587
+ "minLength": 1
4588
+ },
4589
+ "timestamp": {
4590
+ "type": "integer",
4591
+ "minimum": 0,
4592
+ "maximum": 4102444800
4593
+ },
4594
+ "token": {
4595
+ "type": "string",
4596
+ "minLength": 1
4597
+ },
4598
+ "amount": {
4599
+ "type": "string",
4600
+ "maxLength": 78,
4601
+ "pattern": "^(0|[1-9]\\d*)$"
4602
+ }
4603
+ },
4604
+ "required": [
4605
+ "chainId",
4606
+ "txHash"
4607
+ ]
4608
+ },
4609
+ "refunded": {
4610
+ "type": "object",
4611
+ "properties": {
4612
+ "chainId": {
4613
+ "type": "integer",
4614
+ "exclusiveMinimum": 0,
4615
+ "maximum": 9007199254740991
4616
+ },
4617
+ "txHash": {
4618
+ "type": "string",
4619
+ "minLength": 1
4620
+ },
4621
+ "timestamp": {
4622
+ "type": "integer",
4623
+ "minimum": 0,
4624
+ "maximum": 4102444800
4625
+ },
4626
+ "token": {
4627
+ "type": "string",
4628
+ "minLength": 1
4629
+ },
4630
+ "amount": {
4631
+ "type": "string",
4632
+ "maxLength": 78,
4633
+ "pattern": "^(0|[1-9]\\d*)$"
4634
+ }
4635
+ },
4636
+ "required": [
4637
+ "chainId",
4638
+ "txHash"
4639
+ ]
4640
+ }
4987
4641
  }
4988
4642
  }
4989
4643
  },
4990
4644
  "required": [
4991
- "id",
4992
4645
  "type",
4993
- "provider",
4994
- "relatedIntents",
4646
+ "intentHash",
4995
4647
  "status",
4996
- "substatus",
4648
+ "from",
4649
+ "to",
4997
4650
  "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."
4651
+ ]
5000
4652
  }
4653
+ },
4654
+ "createdAt": {
4655
+ "type": "integer",
4656
+ "minimum": 0,
4657
+ "maximum": 4102444800
4658
+ },
4659
+ "refundAddress": {
4660
+ "anyOf": [
4661
+ {
4662
+ "type": "string",
4663
+ "pattern": "^0x[0-9a-fA-F]{40}$"
4664
+ },
4665
+ {
4666
+ "anyOf": [
4667
+ {
4668
+ "type": "string",
4669
+ "pattern": "^T[1-9A-HJ-NP-Za-km-z]{33}$"
4670
+ },
4671
+ {
4672
+ "type": "string",
4673
+ "pattern": "^0x41[0-9a-fA-F]{40}$"
4674
+ }
4675
+ ]
4676
+ },
4677
+ {
4678
+ "type": "string",
4679
+ "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
4680
+ }
4681
+ ]
5001
4682
  }
5002
4683
  },
5003
4684
  "required": [
5004
4685
  "id",
4686
+ "type",
5005
4687
  "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."
4688
+ "updatedAt"
4689
+ ]
5015
4690
  }
5016
4691
  },
5017
- "nextPage": {
4692
+ "nextCursor": {
5018
4693
  "anyOf": [
5019
4694
  {
5020
- "type": "integer",
5021
- "minimum": 2,
5022
- "maximum": 9007199254740991
4695
+ "type": "string",
4696
+ "minLength": 1
5023
4697
  },
5024
4698
  {
5025
4699
  "type": "null"
@@ -5029,9 +4703,8 @@
5029
4703
  },
5030
4704
  "required": [
5031
4705
  "results",
5032
- "nextPage"
5033
- ],
5034
- "description": "A page of transfers. `nextPage` is null on the last page, otherwise an integer >= 2."
4706
+ "nextCursor"
4707
+ ]
5035
4708
  }
5036
4709
  }
5037
4710
  }
@@ -5230,6 +4903,20 @@
5230
4903
  "type": "string",
5231
4904
  "maxLength": 78,
5232
4905
  "pattern": "^(0|[1-9]\\d*)$"
4906
+ },
4907
+ "timestamp": {
4908
+ "type": "integer",
4909
+ "minimum": 0,
4910
+ "maximum": 4102444800
4911
+ },
4912
+ "symbol": {
4913
+ "type": "string",
4914
+ "minLength": 1
4915
+ },
4916
+ "decimals": {
4917
+ "type": "integer",
4918
+ "minimum": 0,
4919
+ "maximum": 9007199254740991
5233
4920
  }
5234
4921
  },
5235
4922
  "required": [
@@ -5259,6 +4946,20 @@
5259
4946
  "type": "string",
5260
4947
  "maxLength": 78,
5261
4948
  "pattern": "^(0|[1-9]\\d*)$"
4949
+ },
4950
+ "timestamp": {
4951
+ "type": "integer",
4952
+ "minimum": 0,
4953
+ "maximum": 4102444800
4954
+ },
4955
+ "symbol": {
4956
+ "type": "string",
4957
+ "minLength": 1
4958
+ },
4959
+ "decimals": {
4960
+ "type": "integer",
4961
+ "minimum": 0,
4962
+ "maximum": 9007199254740991
5262
4963
  }
5263
4964
  },
5264
4965
  "required": [
@@ -5350,6 +5051,20 @@
5350
5051
  "txHash": {
5351
5052
  "type": "string",
5352
5053
  "minLength": 1
5054
+ },
5055
+ "timestamp": {
5056
+ "type": "integer",
5057
+ "minimum": 0,
5058
+ "maximum": 4102444800
5059
+ },
5060
+ "token": {
5061
+ "type": "string",
5062
+ "minLength": 1
5063
+ },
5064
+ "amount": {
5065
+ "type": "string",
5066
+ "maxLength": 78,
5067
+ "pattern": "^(0|[1-9]\\d*)$"
5353
5068
  }
5354
5069
  },
5355
5070
  "required": [
@@ -5368,6 +5083,20 @@
5368
5083
  "txHash": {
5369
5084
  "type": "string",
5370
5085
  "minLength": 1
5086
+ },
5087
+ "timestamp": {
5088
+ "type": "integer",
5089
+ "minimum": 0,
5090
+ "maximum": 4102444800
5091
+ },
5092
+ "token": {
5093
+ "type": "string",
5094
+ "minLength": 1
5095
+ },
5096
+ "amount": {
5097
+ "type": "string",
5098
+ "maxLength": 78,
5099
+ "pattern": "^(0|[1-9]\\d*)$"
5371
5100
  }
5372
5101
  },
5373
5102
  "required": [
@@ -5386,6 +5115,20 @@
5386
5115
  "txHash": {
5387
5116
  "type": "string",
5388
5117
  "minLength": 1
5118
+ },
5119
+ "timestamp": {
5120
+ "type": "integer",
5121
+ "minimum": 0,
5122
+ "maximum": 4102444800
5123
+ },
5124
+ "token": {
5125
+ "type": "string",
5126
+ "minLength": 1
5127
+ },
5128
+ "amount": {
5129
+ "type": "string",
5130
+ "maxLength": 78,
5131
+ "pattern": "^(0|[1-9]\\d*)$"
5389
5132
  }
5390
5133
  },
5391
5134
  "required": [
@@ -5405,6 +5148,35 @@
5405
5148
  "transactions"
5406
5149
  ]
5407
5150
  }
5151
+ },
5152
+ "createdAt": {
5153
+ "type": "integer",
5154
+ "minimum": 0,
5155
+ "maximum": 4102444800
5156
+ },
5157
+ "refundAddress": {
5158
+ "anyOf": [
5159
+ {
5160
+ "type": "string",
5161
+ "pattern": "^0x[0-9a-fA-F]{40}$"
5162
+ },
5163
+ {
5164
+ "anyOf": [
5165
+ {
5166
+ "type": "string",
5167
+ "pattern": "^T[1-9A-HJ-NP-Za-km-z]{33}$"
5168
+ },
5169
+ {
5170
+ "type": "string",
5171
+ "pattern": "^0x41[0-9a-fA-F]{40}$"
5172
+ }
5173
+ ]
5174
+ },
5175
+ {
5176
+ "type": "string",
5177
+ "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
5178
+ }
5179
+ ]
5408
5180
  }
5409
5181
  },
5410
5182
  "required": [