@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.
- package/README.md +11 -34
- package/dist/fixtures/index.js +12 -10
- package/dist/fixtures/index.js.map +1 -1
- package/dist/fixtures/v1/intents-status.response.gasless-handoff.json +30 -0
- package/dist/fixtures/v1/intents-status.response.intent-filled.json +21 -0
- package/dist/fixtures/v1/intents-status.response.quote-enriched.json +63 -0
- package/dist/fixtures/v1/intents-status.response.quote-filled-detail.json +60 -0
- package/dist/fixtures/v1/intents-status.response.unknown.json +20 -0
- package/dist/fixtures/v1/intents-status.response.wallet-page.json +27 -0
- package/dist/generated/build-digest.json +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/v1/endpoints/registry.d.ts +113 -123
- package/dist/v1/endpoints/registry.js +3 -4
- package/dist/v1/endpoints/registry.js.map +1 -1
- package/dist/v1/endpoints/status.d.ts +70 -2
- package/dist/v1/endpoints/status.js +11 -1
- package/dist/v1/endpoints/status.js.map +1 -1
- package/dist/v1/index.d.ts +0 -1
- package/dist/v1/index.js +0 -1
- package/dist/v1/index.js.map +1 -1
- package/dist/v1/types.d.ts +8 -87
- package/openapi/v1.json +477 -705
- package/package.json +2 -1
- package/dist/fixtures/v1/intents-status.response.completed-fulfilled.json +0 -117
- package/dist/fixtures/v1/intents-status.response.completed-refunded.json +0 -101
- package/dist/fixtures/v1/intents-status.response.empty.json +0 -13
- package/dist/fixtures/v1/intents-status.response.pending-fulfillment.json +0 -101
- package/dist/fixtures/v1/intents-status.response.unlinked-intent.json +0 -81
- package/dist/v1/endpoints/transfer-status.d.ts +0 -488
- package/dist/v1/endpoints/transfer-status.js +0 -197
- package/dist/v1/endpoints/transfer-status.js.map +0 -1
package/README.md
CHANGED
|
@@ -14,13 +14,13 @@ While the package is 0.x, pin the patch range or the exact version:
|
|
|
14
14
|
```json
|
|
15
15
|
{
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@eco-foundation/api-schemas": "~0.
|
|
17
|
+
"@eco-foundation/api-schemas": "~0.16.0"
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
**Never write `^0`.** npm resolves `^0.x` as `>=0.0.0 <1.0.0`, so it silently accepts every
|
|
23
|
-
future breaking `0.y` — it is not a pin at all. Use `~0.
|
|
23
|
+
future breaking `0.y` — it is not a pin at all. Use `~0.16.0` or the exact `0.16.0`.
|
|
24
24
|
|
|
25
25
|
A matching version string is not evidence of a matching artifact: also compare
|
|
26
26
|
`V1_SCHEMA_DIGEST` (see [Invariants](#invariants-enforced-in-ci)). Two builds both called
|
|
@@ -30,43 +30,20 @@ A matching version string is not evidence of a matching artifact: also compare
|
|
|
30
30
|
zod-bearing entry point. Which case you are in is decided entirely by your imports; see
|
|
31
31
|
[Consumers](#consumers).
|
|
32
32
|
|
|
33
|
-
## Migrating 0.14.0
|
|
33
|
+
## Migrating 0.14.0 or 0.15.0 -> 0.16.0
|
|
34
34
|
|
|
35
|
-
**
|
|
36
|
-
status entries.
|
|
35
|
+
**From 0.14.0: not breaking.** `GET /v1/intents/status` keeps the 0.14 request and response; 0.16.0 only adds optional members, each absent when the server has no source for it:
|
|
37
36
|
|
|
38
|
-
|
|
39
|
-
`
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
New exports: `TransferStatusQuerySchema`, `TRANSFER_STATUS_QUERY_SHAPE`,
|
|
43
|
-
`TransferStatusEntrySchema`, `TransferStatusResponseSchema`, the transfer enums
|
|
44
|
-
(`TRANSFER_TOKEN_TYPES`, `TRANSFER_STEP_TYPES`, `TRANSFER_TX_TYPES` and their schemas), and the
|
|
45
|
-
`V1Transfer*` types.
|
|
46
|
-
|
|
47
|
-
**1. The response is `{ results, nextPage }`.** `results` holds at most 50 transfers and
|
|
48
|
-
`nextPage` is an integer >= 2 or null. Each transfer carries one of five status pairs
|
|
49
|
-
(`pending/waiting_for_funding`, `pending/waiting_for_fulfillment`, `pending/waiting_for_refund`,
|
|
50
|
-
`completed/fulfilled`, `completed/refunded`), `source` and `destination` sides, and `steps`.
|
|
51
|
-
`id` is the quote id, or null. Any other status pair fails parse.
|
|
52
|
-
|
|
53
|
-
**2. The query is exactly one of five selectors** (`txHash`, `intentHash`, `quoteId`, `jobId`,
|
|
54
|
-
`wallet`), plus optional `page` and `limit`. `sourceTxHash`, `destinationTxHash`, `status` and
|
|
55
|
-
`cursor` are gone. `page` and `limit` are rejected with `intentHash` or `quoteId`.
|
|
56
|
-
|
|
57
|
-
**3. `StatusEntrySchema` and its related schemas are unchanged** and still back
|
|
58
|
-
`/v1/deposit-addresses/status`.
|
|
37
|
+
- Query: `txHash` (a creation or fill tx, either side) and `quoteId` as `quote:<uuid>` as well as a bare uuid. `quoteResponse:<uuid>` is still refused.
|
|
38
|
+
- Entry: `createdAt`, `refundAddress`.
|
|
39
|
+
- `sourceTx` / `destinationTx`: `timestamp`, `symbol`, `decimals`.
|
|
40
|
+
- Step `transactions.created` / `.fulfilled` / `.refunded`: `timestamp`; `refunded` also `token` and `amount` (what the refund returned).
|
|
59
41
|
|
|
60
|
-
|
|
61
|
-
no longer uses them for `intents.status`.
|
|
42
|
+
Every 0.16.0 status fixture parses under the published 0.14.0 schemas (`status-0-14-compat.spec.ts`).
|
|
62
43
|
|
|
63
|
-
**
|
|
64
|
-
`intent-filled`, `quote-filled-detail`, `unknown`, `wallet-page`. Added: `pending-fulfillment`,
|
|
65
|
-
`completed-fulfilled`, `completed-refunded`, `unlinked-intent`, `empty`.
|
|
44
|
+
**From 0.15.0: BREAKING.** 0.15.0's transfers contract is withdrawn: it broke a production caller of `sourceTxHash` / `destinationTxHash`. The `TransferStatus*` schemas, types and fixtures are gone; `intents.status` is the 0.14 contract above.
|
|
66
45
|
|
|
67
|
-
**
|
|
68
|
-
`unknown` entry. `quoteId` also accepts `quote:<uuid>` and `quoteResponse:<uuid>`. A transaction's
|
|
69
|
-
`txLink` must be an http(s) URL.
|
|
46
|
+
**`V1_SCHEMA_DIGEST` MOVES** to `d8c618c2c21d1da2173f941c324530c440c3188f93b18f63a11596988ca1bfa7`, because `openapi/v1.json` changed. Every consumer running `assertNoSkew` moves in the same rollout.
|
|
70
47
|
|
|
71
48
|
## Migrating 0.13.0 -> 0.14.0
|
|
72
49
|
|
package/dist/fixtures/index.js
CHANGED
|
@@ -10,11 +10,12 @@ const deposit_addresses_create_response_gateway_erc20_json_1 = __importDefault(r
|
|
|
10
10
|
const deposit_addresses_lookup_response_default_json_1 = __importDefault(require("./v1/deposit-addresses-lookup.response.default.json"));
|
|
11
11
|
const deposit_addresses_submit_erc_2612_request_deposit_address_target_json_1 = __importDefault(require("./v1/deposit-addresses-submit-erc-2612.request.deposit-address-target.json"));
|
|
12
12
|
const deposit_addresses_submit_erc_3009_request_deposit_address_target_json_1 = __importDefault(require("./v1/deposit-addresses-submit-erc-3009.request.deposit-address-target.json"));
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
const
|
|
13
|
+
const intents_status_response_gasless_handoff_json_1 = __importDefault(require("./v1/intents-status.response.gasless-handoff.json"));
|
|
14
|
+
const intents_status_response_intent_filled_json_1 = __importDefault(require("./v1/intents-status.response.intent-filled.json"));
|
|
15
|
+
const intents_status_response_quote_enriched_json_1 = __importDefault(require("./v1/intents-status.response.quote-enriched.json"));
|
|
16
|
+
const intents_status_response_quote_filled_detail_json_1 = __importDefault(require("./v1/intents-status.response.quote-filled-detail.json"));
|
|
17
|
+
const intents_status_response_unknown_json_1 = __importDefault(require("./v1/intents-status.response.unknown.json"));
|
|
18
|
+
const intents_status_response_wallet_page_json_1 = __importDefault(require("./v1/intents-status.response.wallet-page.json"));
|
|
18
19
|
const intents_submit_erc_3009_response_job_json_1 = __importDefault(require("./v1/intents-submit-erc-3009.response.job.json"));
|
|
19
20
|
const intents_submit_permit2_request_quote_target_json_1 = __importDefault(require("./v1/intents-submit-permit2.request.quote-target.json"));
|
|
20
21
|
const intents_submit_permit3_request_quote_target_json_1 = __importDefault(require("./v1/intents-submit-permit3.request.quote-target.json"));
|
|
@@ -32,16 +33,17 @@ const FIXTURE_BINDINGS = [
|
|
|
32
33
|
bind('quotes.create', 'response', 'all-quotes', quotes_create_response_all_quotes_json_1.default),
|
|
33
34
|
bind('quotes.create', 'request', 'gateway-deposit', quotes_create_request_gateway_deposit_json_1.default),
|
|
34
35
|
bind('quotes.create', 'response', 'gateway-deposit', quotes_create_response_gateway_deposit_json_1.default),
|
|
35
|
-
bind('intents.status', 'response', 'pending-fulfillment', intents_status_response_pending_fulfillment_json_1.default),
|
|
36
|
-
bind('intents.status', 'response', 'completed-fulfilled', intents_status_response_completed_fulfilled_json_1.default),
|
|
37
|
-
bind('intents.status', 'response', 'completed-refunded', intents_status_response_completed_refunded_json_1.default),
|
|
38
|
-
bind('intents.status', 'response', 'unlinked-intent', intents_status_response_unlinked_intent_json_1.default),
|
|
39
|
-
bind('intents.status', 'response', 'empty', intents_status_response_empty_json_1.default),
|
|
40
36
|
bind('intents.submit.erc-3009', 'response', 'job', intents_submit_erc_3009_response_job_json_1.default),
|
|
41
37
|
bind('intents.submit.permit2', 'request', 'quote-target', intents_submit_permit2_request_quote_target_json_1.default),
|
|
42
38
|
bind('intents.submit.permit3', 'request', 'quote-target', intents_submit_permit3_request_quote_target_json_1.default),
|
|
43
39
|
bind('deposit-addresses.submit.erc-3009', 'request', 'deposit-address-target', deposit_addresses_submit_erc_3009_request_deposit_address_target_json_1.default),
|
|
44
40
|
bind('deposit-addresses.submit.erc-2612', 'request', 'deposit-address-target', deposit_addresses_submit_erc_2612_request_deposit_address_target_json_1.default),
|
|
41
|
+
bind('intents.status', 'response', 'intent-filled', intents_status_response_intent_filled_json_1.default),
|
|
42
|
+
bind('intents.status', 'response', 'unknown', intents_status_response_unknown_json_1.default),
|
|
43
|
+
bind('intents.status', 'response', 'gasless-handoff', intents_status_response_gasless_handoff_json_1.default),
|
|
44
|
+
bind('intents.status', 'response', 'wallet-page', intents_status_response_wallet_page_json_1.default),
|
|
45
|
+
bind('intents.status', 'response', 'quote-filled-detail', intents_status_response_quote_filled_detail_json_1.default),
|
|
46
|
+
bind('intents.status', 'response', 'quote-enriched', intents_status_response_quote_enriched_json_1.default),
|
|
45
47
|
bind('chains.list', 'response', 'default', chains_list_response_default_json_1.default),
|
|
46
48
|
bind('tokens.list', 'response', 'default', tokens_list_response_default_json_1.default),
|
|
47
49
|
bind('routes.list', 'response', 'default', routes_list_response_default_json_1.default, { stability: 'draft' }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/fixtures/index.ts"],"names":[],"mappings":";;;;;;AACA,+GAAgE;AAChE,mJAAuF;AACvF,qJAAyF;AACzF,yIAA2E;AAC3E,uLAAsG;AACtG,uLAAsG;AACtG,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/fixtures/index.ts"],"names":[],"mappings":";;;;;;AACA,+GAAgE;AAChE,mJAAuF;AACvF,qJAAyF;AACzF,yIAA2E;AAC3E,uLAAsG;AACtG,uLAAsG;AACtG,qIAA8E;AAC9E,iIAA2E;AAC3E,mIAAmF;AACnF,6IAAsF;AACtF,qHAAsE;AACtE,6HAAuE;AACvE,+HAA2E;AAC3E,6IAAkF;AAClF,6IAAkF;AAClF,iIAA0F;AAC1F,2GAAiE;AACjE,yHAA0E;AAC1E,mIAA4F;AAC5F,6GAAmE;AACnE,+GAAgE;AAChE,+GAAgE;AA0ChE,MAAM,IAAI,GAAG,CACX,UAAwB,EACxB,SAAiC,EACjC,OAAe,EACf,IAAa,EACb,OAA+E,EAAE,EACjF,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;AAezD,MAAM,gBAAgB,GAAG;IACvB,IAAI,CAAC,eAAe,EAAE,SAAS,EAAE,MAAM,EAAE,yCAAa,CAAC;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AAC,OAAO,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,IAAI,EAAE,CAAC,EAAE,CAAC;QACjF,MAAM,IAAI,KAAK,CACb,kDAAkD;YAChD,GAAG,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,SAAS,IAAI,OAAO,CAAC,OAAO,EAAE,CAClE,CAAC;IACJ,CAAC;IACD,OAAO,IAA4B,CAAC;AACtC,CAAC;AAEY,QAAA,WAAW,GAAyB,gBAAgB,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"endpointId": "intents.status",
|
|
3
|
+
"direction": "response",
|
|
4
|
+
"variant": "gasless-handoff",
|
|
5
|
+
"method": "GET",
|
|
6
|
+
"path": "/v1/intents/status?jobId=0f450218-1b2c-4d3e-8f9a-0b1c2d3e4f5a",
|
|
7
|
+
"expectedStatus": 200,
|
|
8
|
+
"sideEffect": false,
|
|
9
|
+
"payload": {
|
|
10
|
+
"results": [
|
|
11
|
+
{
|
|
12
|
+
"id": "gasless:0f450218-1b2c-4d3e-8f9a-0b1c2d3e4f5a",
|
|
13
|
+
"type": "gasless",
|
|
14
|
+
"status": "published",
|
|
15
|
+
"updatedAt": 1767225600,
|
|
16
|
+
"intentHashes": ["0xabababababababababababababababababababababababababababababababab"],
|
|
17
|
+
"subStatuses": [
|
|
18
|
+
{
|
|
19
|
+
"chainId": 8453,
|
|
20
|
+
"quoteIds": ["quote:8f14e45f-ea3c-4c2d-9b6e-1a2b3c4d5e6f"],
|
|
21
|
+
"txHash": "0xefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefef",
|
|
22
|
+
"intentHashes": ["0xabababababababababababababababababababababababababababababababab"],
|
|
23
|
+
"state": "published"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"nextCursor": null
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"endpointId": "intents.status",
|
|
3
|
+
"direction": "response",
|
|
4
|
+
"variant": "intent-filled",
|
|
5
|
+
"method": "GET",
|
|
6
|
+
"path": "/v1/intents/status?intentHash=0xabababababababababababababababababababababababababababababababab",
|
|
7
|
+
"expectedStatus": 200,
|
|
8
|
+
"sideEffect": false,
|
|
9
|
+
"payload": {
|
|
10
|
+
"results": [
|
|
11
|
+
{
|
|
12
|
+
"id": "intent:0xabababababababababababababababababababababababababababababababab",
|
|
13
|
+
"type": "intent",
|
|
14
|
+
"status": "filled",
|
|
15
|
+
"updatedAt": 1767225600,
|
|
16
|
+
"txHash": "0xefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefef"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"nextCursor": null
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"endpointId": "intents.status",
|
|
3
|
+
"direction": "response",
|
|
4
|
+
"variant": "quote-enriched",
|
|
5
|
+
"method": "GET",
|
|
6
|
+
"path": "/v1/intents/status?quoteId=quote:7d3f1c2a-5b6e-4f80-9a1b-2c3d4e5f6a7b",
|
|
7
|
+
"expectedStatus": 200,
|
|
8
|
+
"sideEffect": false,
|
|
9
|
+
"payload": {
|
|
10
|
+
"results": [
|
|
11
|
+
{
|
|
12
|
+
"id": "quote:7d3f1c2a-5b6e-4f80-9a1b-2c3d4e5f6a7b",
|
|
13
|
+
"type": "quote",
|
|
14
|
+
"status": "submitted",
|
|
15
|
+
"intentHashes": ["0x6a1f3e9b2c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f708192a3b4c5d6e7"],
|
|
16
|
+
"createdAt": 1792765400,
|
|
17
|
+
"updatedAt": 1792765990,
|
|
18
|
+
"refundAddress": "0x3333333333333333333333333333333333333333",
|
|
19
|
+
"steps": [
|
|
20
|
+
{
|
|
21
|
+
"type": "BRIDGE",
|
|
22
|
+
"intentHash": "0x6a1f3e9b2c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f708192a3b4c5d6e7",
|
|
23
|
+
"status": "REFUNDED",
|
|
24
|
+
"from": {
|
|
25
|
+
"token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
|
|
26
|
+
"amount": "5000000",
|
|
27
|
+
"chainId": 8453
|
|
28
|
+
},
|
|
29
|
+
"to": {
|
|
30
|
+
"token": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
|
|
31
|
+
"amount": "4995000",
|
|
32
|
+
"chainId": 10
|
|
33
|
+
},
|
|
34
|
+
"transactions": {
|
|
35
|
+
"created": {
|
|
36
|
+
"chainId": 8453,
|
|
37
|
+
"txHash": "0x1f2e3d4c5b6a79881726354453627180f9e8d7c6b5a49382716051f4e3d2c1b0",
|
|
38
|
+
"timestamp": 1792765412
|
|
39
|
+
},
|
|
40
|
+
"refunded": {
|
|
41
|
+
"chainId": 8453,
|
|
42
|
+
"txHash": "0x9a8b7c6d5e4f30211203f4e5d6c7b8a99a8b7c6d5e4f30211203f4e5d6c7b8a9",
|
|
43
|
+
"timestamp": 1792765990,
|
|
44
|
+
"token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
|
|
45
|
+
"amount": "5000000"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
"sourceTx": {
|
|
51
|
+
"chainId": 8453,
|
|
52
|
+
"txHash": "0x1f2e3d4c5b6a79881726354453627180f9e8d7c6b5a49382716051f4e3d2c1b0",
|
|
53
|
+
"token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
|
|
54
|
+
"amount": "5000000",
|
|
55
|
+
"timestamp": 1792765412,
|
|
56
|
+
"symbol": "USDC",
|
|
57
|
+
"decimals": 6
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"nextCursor": null
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"endpointId": "intents.status",
|
|
3
|
+
"direction": "response",
|
|
4
|
+
"variant": "quote-filled-detail",
|
|
5
|
+
"method": "GET",
|
|
6
|
+
"path": "/v1/intents/status?quoteId=c1ed3798-e227-45a6-ad7c-b805f9e7a392",
|
|
7
|
+
"expectedStatus": 200,
|
|
8
|
+
"sideEffect": false,
|
|
9
|
+
"payload": {
|
|
10
|
+
"results": [
|
|
11
|
+
{
|
|
12
|
+
"id": "quote:c1ed3798-e227-45a6-ad7c-b805f9e7a392",
|
|
13
|
+
"type": "quote",
|
|
14
|
+
"status": "submitted",
|
|
15
|
+
"intentHashes": ["0x28cf072bb7fcd236cb417ef542f91002a84e04afb4c144ceb3ded8056bfa790f"],
|
|
16
|
+
"updatedAt": 1789432832,
|
|
17
|
+
"steps": [
|
|
18
|
+
{
|
|
19
|
+
"type": "BRIDGE",
|
|
20
|
+
"intentHash": "0x28cf072bb7fcd236cb417ef542f91002a84e04afb4c144ceb3ded8056bfa790f",
|
|
21
|
+
"status": "FULFILLED",
|
|
22
|
+
"from": {
|
|
23
|
+
"token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
|
|
24
|
+
"amount": "1000000",
|
|
25
|
+
"chainId": 8453
|
|
26
|
+
},
|
|
27
|
+
"to": {
|
|
28
|
+
"token": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
|
|
29
|
+
"amount": "989500",
|
|
30
|
+
"chainId": 10
|
|
31
|
+
},
|
|
32
|
+
"transactions": {
|
|
33
|
+
"created": {
|
|
34
|
+
"chainId": 8453,
|
|
35
|
+
"txHash": "0x522dc811ae11692c9066747d24e96fa6d42315945aef9246ac19adb5663fe5c9"
|
|
36
|
+
},
|
|
37
|
+
"fulfilled": {
|
|
38
|
+
"chainId": 10,
|
|
39
|
+
"txHash": "0xace13db990e6c9aac0957510443262a90c128795c30086a5b0e62ac713c20866"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"sourceTx": {
|
|
45
|
+
"chainId": 8453,
|
|
46
|
+
"txHash": "0x522dc811ae11692c9066747d24e96fa6d42315945aef9246ac19adb5663fe5c9",
|
|
47
|
+
"token": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
|
|
48
|
+
"amount": "1000000"
|
|
49
|
+
},
|
|
50
|
+
"destinationTx": {
|
|
51
|
+
"chainId": 10,
|
|
52
|
+
"txHash": "0xace13db990e6c9aac0957510443262a90c128795c30086a5b0e62ac713c20866",
|
|
53
|
+
"token": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
|
|
54
|
+
"amount": "989500"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
],
|
|
58
|
+
"nextCursor": null
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"endpointId": "intents.status",
|
|
3
|
+
"direction": "response",
|
|
4
|
+
"variant": "unknown",
|
|
5
|
+
"method": "GET",
|
|
6
|
+
"path": "/v1/intents/status?intentHash=0xcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd",
|
|
7
|
+
"expectedStatus": 200,
|
|
8
|
+
"sideEffect": false,
|
|
9
|
+
"payload": {
|
|
10
|
+
"results": [
|
|
11
|
+
{
|
|
12
|
+
"id": "intent:0xcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd",
|
|
13
|
+
"type": "intent",
|
|
14
|
+
"status": "unknown",
|
|
15
|
+
"updatedAt": null
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"nextCursor": null
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"endpointId": "intents.status",
|
|
3
|
+
"direction": "response",
|
|
4
|
+
"variant": "wallet-page",
|
|
5
|
+
"method": "GET",
|
|
6
|
+
"path": "/v1/intents/status?wallet=0x1111111111111111111111111111111111111111&limit=2",
|
|
7
|
+
"expectedStatus": 200,
|
|
8
|
+
"sideEffect": false,
|
|
9
|
+
"payload": {
|
|
10
|
+
"results": [
|
|
11
|
+
{
|
|
12
|
+
"id": "intent:0xabababababababababababababababababababababababababababababababab",
|
|
13
|
+
"type": "intent",
|
|
14
|
+
"status": "filled",
|
|
15
|
+
"updatedAt": 1767225600,
|
|
16
|
+
"txHash": "0xefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefefef"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"id": "intent:0xcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd",
|
|
20
|
+
"type": "intent",
|
|
21
|
+
"status": "unknown",
|
|
22
|
+
"updatedAt": null
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"nextCursor": "Y3Vyc29yOjE3NjcyMjU2MDA6aW50ZW50OjB4YWJhYg"
|
|
26
|
+
}
|
|
27
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ export { generateOpenApiDocument, STABLE_TAG } from './openapi';
|
|
|
3
3
|
export type { V1Fixture } from './testing';
|
|
4
4
|
export { assertMatchesV1Schema, loadV1Fixtures } from './testing';
|
|
5
5
|
export * as v1 from './v1';
|
|
6
|
-
export type { LegacyCodeRef, V1Chain, V1ChainType, V1DepositAddress, V1DepositAddressChainStatus, V1DepositAddressCreateRequest, V1DepositAddressCreateResponse, V1DepositAddressType, V1DestinationCall, V1ErrorCode, V1ErrorDefinition, V1Execution, V1Fee, V1FeeToken, V1FeeType, V1FundingTransaction, V1GaslessJob, V1GaslessJobStatus, V1GaslessSubState, V1GaslessSubStatus, V1IntentCall, V1IntentReward, V1IntentRoute, V1IntentTokenAmount, V1ProblemBody, V1QuoteCore, V1QuoteRequest, V1QuoteResponse, V1QuoteType, V1RankedQuoteEntry, V1RelatedIntentRole, V1SolverIdentity, V1StatusEntry, V1StatusStep, V1StatusStepType, V1StatusTokenAmount, V1StatusTxDetail, V1StatusTxRef, V1StatusType, V1Step, V1StepIntent, V1StepLeg, V1StepType, V1SvmAccountMeta, V1SvmInstruction, V1TokenEntry,
|
|
6
|
+
export type { LegacyCodeRef, V1Chain, V1ChainType, V1DepositAddress, V1DepositAddressChainStatus, V1DepositAddressCreateRequest, V1DepositAddressCreateResponse, V1DepositAddressType, V1DestinationCall, V1ErrorCode, V1ErrorDefinition, V1Execution, V1Fee, V1FeeToken, V1FeeType, V1FundingTransaction, V1GaslessJob, V1GaslessJobStatus, V1GaslessSubState, V1GaslessSubStatus, V1IntentCall, V1IntentReward, V1IntentRoute, V1IntentTokenAmount, V1ProblemBody, V1QuoteCore, V1QuoteRequest, V1QuoteResponse, V1QuoteType, V1RankedQuoteEntry, V1RelatedIntentRole, V1SolverIdentity, V1StatusEntry, V1StatusStep, V1StatusStepType, V1StatusTokenAmount, V1StatusTxDetail, V1StatusTxRef, V1StatusType, V1Step, V1StepIntent, V1StepLeg, V1StepType, V1SvmAccountMeta, V1SvmInstruction, V1TokenEntry, } from './v1/types';
|