@eco-foundation/api-schemas 0.14.0 → 0.15.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 (28) hide show
  1. package/README.md +40 -2
  2. package/dist/fixtures/index.js +10 -10
  3. package/dist/fixtures/index.js.map +1 -1
  4. package/dist/fixtures/v1/intents-status.response.completed-fulfilled.json +117 -0
  5. package/dist/fixtures/v1/intents-status.response.completed-refunded.json +101 -0
  6. package/dist/fixtures/v1/intents-status.response.empty.json +13 -0
  7. package/dist/fixtures/v1/intents-status.response.pending-fulfillment.json +101 -0
  8. package/dist/fixtures/v1/intents-status.response.unlinked-intent.json +81 -0
  9. package/dist/generated/build-digest.json +1 -1
  10. package/dist/index.d.ts +1 -1
  11. package/dist/v1/endpoints/registry.d.ts +123 -78
  12. package/dist/v1/endpoints/registry.js +4 -3
  13. package/dist/v1/endpoints/registry.js.map +1 -1
  14. package/dist/v1/endpoints/status.js.map +1 -1
  15. package/dist/v1/endpoints/transfer-status.d.ts +488 -0
  16. package/dist/v1/endpoints/transfer-status.js +197 -0
  17. package/dist/v1/endpoints/transfer-status.js.map +1 -0
  18. package/dist/v1/index.d.ts +1 -0
  19. package/dist/v1/index.js +1 -0
  20. package/dist/v1/index.js.map +1 -1
  21. package/dist/v1/types.d.ts +87 -0
  22. package/openapi/v1.json +725 -270
  23. package/package.json +1 -1
  24. package/dist/fixtures/v1/intents-status.response.gasless-handoff.json +0 -30
  25. package/dist/fixtures/v1/intents-status.response.intent-filled.json +0 -21
  26. package/dist/fixtures/v1/intents-status.response.quote-filled-detail.json +0 -60
  27. package/dist/fixtures/v1/intents-status.response.unknown.json +0 -20
  28. package/dist/fixtures/v1/intents-status.response.wallet-page.json +0 -27
package/openapi/v1.json CHANGED
@@ -4118,26 +4118,18 @@
4118
4118
  "/v1/intents/status": {
4119
4119
  "get": {
4120
4120
  "operationId": "intents.status",
4121
- "summary": "Track intents, quotes and solver gasless jobs. Always 200; an unknown exact id reports status \"unknown\".",
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.",
4122
4122
  "tags": [
4123
4123
  "status",
4124
4124
  "stable"
4125
4125
  ],
4126
4126
  "parameters": [
4127
4127
  {
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",
4128
+ "name": "txHash",
4138
4129
  "in": "query",
4139
4130
  "required": false,
4140
4131
  "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.",
4141
4133
  "anyOf": [
4142
4134
  {
4143
4135
  "type": "string",
@@ -4155,41 +4147,44 @@
4155
4147
  }
4156
4148
  },
4157
4149
  {
4158
- "name": "destinationTxHash",
4150
+ "name": "intentHash",
4151
+ "in": "query",
4152
+ "required": false,
4153
+ "schema": {
4154
+ "description": "An intent hash.",
4155
+ "type": "string",
4156
+ "pattern": "^0x[0-9a-fA-F]{64}$"
4157
+ }
4158
+ },
4159
+ {
4160
+ "name": "quoteId",
4159
4161
  "in": "query",
4160
4162
  "required": false,
4161
4163
  "schema": {
4164
+ "description": "A quote id: a bare uuid, `quote:<uuid>` or `quoteResponse:<uuid>`.",
4162
4165
  "anyOf": [
4163
4166
  {
4164
4167
  "type": "string",
4165
- "pattern": "^0x[0-9a-fA-F]{64}$"
4168
+ "format": "uuid",
4169
+ "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)$"
4166
4170
  },
4167
4171
  {
4168
4172
  "type": "string",
4169
- "pattern": "^[0-9a-fA-F]{64}$"
4173
+ "pattern": "^quote:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
4170
4174
  },
4171
4175
  {
4172
4176
  "type": "string",
4173
- "pattern": "^[1-9A-HJ-NP-Za-km-z]{64,88}$"
4177
+ "pattern": "^quoteResponse:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
4174
4178
  }
4175
4179
  ]
4176
4180
  }
4177
4181
  },
4178
- {
4179
- "name": "quoteId",
4180
- "in": "query",
4181
- "required": false,
4182
- "schema": {
4183
- "type": "string",
4184
- "format": "uuid",
4185
- "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)$"
4186
- }
4187
- },
4188
4182
  {
4189
4183
  "name": "jobId",
4190
4184
  "in": "query",
4191
4185
  "required": false,
4192
4186
  "schema": {
4187
+ "description": "A submit job id.",
4193
4188
  "type": "string",
4194
4189
  "format": "uuid",
4195
4190
  "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)$"
@@ -4200,35 +4195,40 @@
4200
4195
  "in": "query",
4201
4196
  "required": false,
4202
4197
  "schema": {
4203
- "type": "string",
4204
- "minLength": 1
4205
- }
4206
- },
4207
- {
4208
- "name": "status",
4209
- "in": "query",
4210
- "required": false,
4211
- "schema": {
4212
- "type": "string",
4213
- "enum": [
4214
- "pending",
4215
- "filled",
4216
- "settled",
4217
- "refunded",
4218
- "refundable",
4219
- "expired",
4220
- "failed",
4221
- "unknown"
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
+ }
4222
4220
  ]
4223
4221
  }
4224
4222
  },
4225
4223
  {
4226
- "name": "cursor",
4224
+ "name": "page",
4227
4225
  "in": "query",
4228
4226
  "required": false,
4229
4227
  "schema": {
4230
- "type": "string",
4231
- "minLength": 1
4228
+ "description": "Page number, default 1.",
4229
+ "type": "integer",
4230
+ "minimum": 1,
4231
+ "maximum": 9007199254740991
4232
4232
  }
4233
4233
  },
4234
4234
  {
@@ -4236,7 +4236,7 @@
4236
4236
  "in": "query",
4237
4237
  "required": false,
4238
4238
  "schema": {
4239
- "default": 20,
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.",
4240
4240
  "type": "integer",
4241
4241
  "minimum": 1,
4242
4242
  "maximum": 50
@@ -4258,23 +4258,34 @@
4258
4258
  "type": "object",
4259
4259
  "properties": {
4260
4260
  "id": {
4261
- "type": "string",
4262
- "minLength": 1
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
+ ]
4263
4270
  },
4264
- "type": {
4271
+ "status": {
4265
4272
  "type": "string",
4266
4273
  "enum": [
4267
- "intent",
4268
- "quote",
4269
- "gasless",
4270
- "deposit-address"
4274
+ "pending",
4275
+ "completed"
4271
4276
  ]
4272
4277
  },
4273
- "status": {
4278
+ "substatus": {
4274
4279
  "type": "string",
4275
- "minLength": 1
4280
+ "enum": [
4281
+ "waiting_for_funding",
4282
+ "waiting_for_fulfillment",
4283
+ "waiting_for_refund",
4284
+ "fulfilled",
4285
+ "refunded"
4286
+ ]
4276
4287
  },
4277
- "updatedAt": {
4288
+ "createdAt": {
4278
4289
  "anyOf": [
4279
4290
  {
4280
4291
  "type": "integer",
@@ -4286,286 +4297,729 @@
4286
4297
  }
4287
4298
  ]
4288
4299
  },
4289
- "intentHashes": {
4290
- "type": "array",
4291
- "items": {
4292
- "type": "string",
4293
- "pattern": "^0x[0-9a-fA-F]{64}$"
4294
- }
4295
- },
4296
- "txHash": {
4300
+ "updatedAt": {
4297
4301
  "anyOf": [
4298
4302
  {
4299
- "type": "string"
4303
+ "type": "integer",
4304
+ "minimum": 0,
4305
+ "maximum": 4102444800
4300
4306
  },
4301
4307
  {
4302
4308
  "type": "null"
4303
4309
  }
4304
4310
  ]
4305
4311
  },
4306
- "subStatuses": {
4307
- "type": "array",
4308
- "items": {
4309
- "type": "object",
4310
- "properties": {
4311
- "chainId": {
4312
- "type": "integer",
4313
- "exclusiveMinimum": 0,
4314
- "maximum": 9007199254740991
4315
- },
4316
- "quoteIds": {
4317
- "type": "array",
4318
- "items": {
4312
+ "refundAddress": {
4313
+ "anyOf": [
4314
+ {
4315
+ "anyOf": [
4316
+ {
4319
4317
  "type": "string",
4320
- "pattern": "^quote:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
4321
- }
4322
- },
4323
- "txHash": {
4324
- "anyOf": [
4325
- {
4326
- "type": "string"
4327
- },
4328
- {
4329
- "type": "null"
4330
- }
4331
- ]
4332
- },
4333
- "intentHashes": {
4334
- "type": "array",
4335
- "items": {
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
+ {
4336
4333
  "type": "string",
4337
- "pattern": "^0x[0-9a-fA-F]{64}$"
4334
+ "pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
4338
4335
  }
4339
- },
4340
- "state": {
4341
- "type": "string",
4342
- "enum": [
4343
- "pending",
4344
- "submitted",
4345
- "published",
4346
- "failed"
4347
- ]
4348
- }
4349
- },
4350
- "required": [
4351
- "chainId",
4352
- "quoteIds",
4353
- "txHash",
4354
- "intentHashes",
4355
- "state"
4356
- ]
4357
- }
4358
- },
4359
- "sourceTx": {
4360
- "type": "object",
4361
- "properties": {
4362
- "chainId": {
4363
- "type": "integer",
4364
- "exclusiveMinimum": 0,
4365
- "maximum": 9007199254740991
4366
- },
4367
- "txHash": {
4368
- "type": "string",
4369
- "minLength": 1
4370
- },
4371
- "token": {
4372
- "type": "string",
4373
- "minLength": 1
4336
+ ]
4374
4337
  },
4375
- "amount": {
4376
- "type": "string",
4377
- "maxLength": 78,
4378
- "pattern": "^(0|[1-9]\\d*)$"
4338
+ {
4339
+ "type": "null"
4379
4340
  }
4380
- },
4381
- "required": [
4382
- "chainId",
4383
- "txHash",
4384
- "token",
4385
- "amount"
4386
4341
  ]
4387
4342
  },
4388
- "destinationTx": {
4343
+ "source": {
4389
4344
  "type": "object",
4390
4345
  "properties": {
4346
+ "status": {
4347
+ "type": "string",
4348
+ "enum": [
4349
+ "pending",
4350
+ "completed"
4351
+ ]
4352
+ },
4391
4353
  "chainId": {
4392
- "type": "integer",
4393
- "exclusiveMinimum": 0,
4394
- "maximum": 9007199254740991
4354
+ "anyOf": [
4355
+ {
4356
+ "type": "integer",
4357
+ "exclusiveMinimum": 0,
4358
+ "maximum": 9007199254740991
4359
+ },
4360
+ {
4361
+ "type": "null"
4362
+ }
4363
+ ]
4395
4364
  },
4396
4365
  "txHash": {
4397
- "type": "string",
4398
- "minLength": 1
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
+ ]
4399
4387
  },
4400
- "token": {
4401
- "type": "string",
4402
- "minLength": 1
4388
+ "timestamp": {
4389
+ "anyOf": [
4390
+ {
4391
+ "type": "integer",
4392
+ "minimum": 0,
4393
+ "maximum": 4102444800
4394
+ },
4395
+ {
4396
+ "type": "null"
4397
+ }
4398
+ ]
4403
4399
  },
4404
- "amount": {
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
+ ]
4460
+ },
4461
+ "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
+ ]
4473
+ },
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
+ ]
4504
+ }
4505
+ },
4506
+ "required": [
4507
+ "status",
4508
+ "chainId",
4509
+ "txHash",
4510
+ "timestamp",
4511
+ "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."
4516
+ },
4517
+ "destination": {
4518
+ "type": "object",
4519
+ "properties": {
4520
+ "status": {
4405
4521
  "type": "string",
4406
- "maxLength": 78,
4407
- "pattern": "^(0|[1-9]\\d*)$"
4522
+ "enum": [
4523
+ "pending",
4524
+ "completed"
4525
+ ]
4526
+ },
4527
+ "chainId": {
4528
+ "anyOf": [
4529
+ {
4530
+ "type": "integer",
4531
+ "exclusiveMinimum": 0,
4532
+ "maximum": 9007199254740991
4533
+ },
4534
+ {
4535
+ "type": "null"
4536
+ }
4537
+ ]
4538
+ },
4539
+ "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
+ ]
4647
+ },
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
+ ]
4408
4678
  }
4409
4679
  },
4410
4680
  "required": [
4681
+ "status",
4411
4682
  "chainId",
4412
4683
  "txHash",
4684
+ "timestamp",
4413
4685
  "token",
4414
- "amount"
4415
- ]
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."
4416
4690
  },
4417
4691
  "steps": {
4418
4692
  "type": "array",
4419
4693
  "items": {
4420
4694
  "type": "object",
4421
4695
  "properties": {
4696
+ "id": {
4697
+ "type": "string",
4698
+ "minLength": 1
4699
+ },
4422
4700
  "type": {
4423
4701
  "type": "string",
4424
4702
  "enum": [
4425
- "SWAP",
4426
- "BRIDGE"
4703
+ "swap",
4704
+ "bridge",
4705
+ "transfer",
4706
+ "call",
4707
+ "refund"
4427
4708
  ]
4428
4709
  },
4429
- "intentHash": {
4430
- "type": "string",
4431
- "pattern": "^0x[0-9a-fA-F]{64}$"
4432
- },
4433
- "status": {
4434
- "type": "string",
4435
- "minLength": 1
4436
- },
4437
- "from": {
4438
- "type": "object",
4439
- "properties": {
4440
- "token": {
4710
+ "provider": {
4711
+ "anyOf": [
4712
+ {
4441
4713
  "type": "string",
4442
4714
  "minLength": 1
4443
4715
  },
4444
- "amount": {
4445
- "type": "string",
4446
- "maxLength": 78,
4447
- "pattern": "^(0|[1-9]\\d*)$"
4448
- },
4449
- "chainId": {
4450
- "type": "integer",
4451
- "exclusiveMinimum": 0,
4452
- "maximum": 9007199254740991
4716
+ {
4717
+ "type": "null"
4453
4718
  }
4454
- },
4455
- "required": [
4456
- "token",
4457
- "amount",
4458
- "chainId"
4459
4719
  ]
4460
4720
  },
4461
- "to": {
4462
- "type": "object",
4463
- "properties": {
4464
- "token": {
4465
- "type": "string",
4466
- "minLength": 1
4467
- },
4468
- "amount": {
4469
- "type": "string",
4470
- "maxLength": 78,
4471
- "pattern": "^(0|[1-9]\\d*)$"
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
+ }
4472
4752
  },
4473
- "chainId": {
4474
- "type": "integer",
4475
- "exclusiveMinimum": 0,
4476
- "maximum": 9007199254740991
4477
- }
4478
- },
4479
- "required": [
4480
- "token",
4481
- "amount",
4482
- "chainId"
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"
4483
4777
  ]
4484
4778
  },
4485
4779
  "transactions": {
4486
- "type": "object",
4487
- "properties": {
4488
- "created": {
4489
- "type": "object",
4490
- "properties": {
4491
- "chainId": {
4492
- "type": "integer",
4493
- "exclusiveMinimum": 0,
4494
- "maximum": 9007199254740991
4495
- },
4496
- "txHash": {
4497
- "type": "string",
4498
- "minLength": 1
4499
- }
4780
+ "type": "array",
4781
+ "items": {
4782
+ "type": "object",
4783
+ "properties": {
4784
+ "chainId": {
4785
+ "type": "integer",
4786
+ "exclusiveMinimum": 0,
4787
+ "maximum": 9007199254740991
4500
4788
  },
4501
- "required": [
4502
- "chainId",
4503
- "txHash"
4504
- ]
4505
- },
4506
- "fulfilled": {
4507
- "type": "object",
4508
- "properties": {
4509
- "chainId": {
4510
- "type": "integer",
4511
- "exclusiveMinimum": 0,
4512
- "maximum": 9007199254740991
4513
- },
4514
- "txHash": {
4515
- "type": "string",
4516
- "minLength": 1
4517
- }
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
+ ]
4518
4804
  },
4519
- "required": [
4520
- "chainId",
4521
- "txHash"
4522
- ]
4523
- },
4524
- "refunded": {
4525
- "type": "object",
4526
- "properties": {
4527
- "chainId": {
4528
- "type": "integer",
4529
- "exclusiveMinimum": 0,
4530
- "maximum": 9007199254740991
4531
- },
4532
- "txHash": {
4533
- "type": "string",
4534
- "minLength": 1
4535
- }
4805
+ "txLink": {
4806
+ "anyOf": [
4807
+ {
4808
+ "type": "string",
4809
+ "format": "uri"
4810
+ },
4811
+ {
4812
+ "type": "null"
4813
+ }
4814
+ ]
4536
4815
  },
4537
- "required": [
4538
- "chainId",
4539
- "txHash"
4540
- ]
4541
- }
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
+ ]
4960
+ },
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
+ }
4974
+ },
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."
4542
4987
  }
4543
4988
  }
4544
4989
  },
4545
4990
  "required": [
4991
+ "id",
4546
4992
  "type",
4547
- "intentHash",
4993
+ "provider",
4994
+ "relatedIntents",
4548
4995
  "status",
4549
- "from",
4550
- "to",
4996
+ "substatus",
4551
4997
  "transactions"
4552
- ]
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."
4553
5000
  }
4554
5001
  }
4555
5002
  },
4556
5003
  "required": [
4557
5004
  "id",
4558
- "type",
4559
5005
  "status",
4560
- "updatedAt"
4561
- ]
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."
4562
5015
  }
4563
5016
  },
4564
- "nextCursor": {
5017
+ "nextPage": {
4565
5018
  "anyOf": [
4566
5019
  {
4567
- "type": "string",
4568
- "minLength": 1
5020
+ "type": "integer",
5021
+ "minimum": 2,
5022
+ "maximum": 9007199254740991
4569
5023
  },
4570
5024
  {
4571
5025
  "type": "null"
@@ -4575,8 +5029,9 @@
4575
5029
  },
4576
5030
  "required": [
4577
5031
  "results",
4578
- "nextCursor"
4579
- ]
5032
+ "nextPage"
5033
+ ],
5034
+ "description": "A page of transfers. `nextPage` is null on the last page, otherwise an integer >= 2."
4580
5035
  }
4581
5036
  }
4582
5037
  }