@eco-foundation/api-schemas 0.8.0 → 0.9.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 +89 -12
- package/dist/fixtures/index.js +6 -6
- package/dist/fixtures/index.js.map +1 -1
- package/dist/fixtures/v1/deposit-addresses-create.request.gateway-erc20.json +1 -1
- package/dist/fixtures/v1/deposit-addresses-create.response.gateway-erc20.json +1 -1
- package/dist/fixtures/v1/deposit-addresses-lookup.response.default.json +1 -1
- package/dist/fixtures/v1/intents-status.response.quote-filled-detail.json +60 -0
- package/dist/fixtures/v1/{quotes-create.request.public-swap.json → quotes-create.request.swap.json} +4 -4
- package/dist/fixtures/v1/quotes-create.response.all-quotes.json +288 -81
- package/dist/fixtures/v1/quotes-create.response.swap.json +228 -0
- package/dist/generated/build-digest.json +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/openapi.js +18 -0
- package/dist/openapi.js.map +1 -1
- package/dist/v1/endpoints/deposit-addresses.d.ts +12 -12
- package/dist/v1/endpoints/deposit-addresses.js +9 -9
- package/dist/v1/endpoints/quotes.d.ts +343 -193
- package/dist/v1/endpoints/quotes.js +50 -60
- package/dist/v1/endpoints/quotes.js.map +1 -1
- package/dist/v1/endpoints/registry.d.ts +114 -76
- package/dist/v1/endpoints/routes.js +1 -1
- package/dist/v1/endpoints/routes.js.map +1 -1
- package/dist/v1/endpoints/status.d.ts +4 -0
- package/dist/v1/endpoints/status.js +1 -0
- package/dist/v1/endpoints/status.js.map +1 -1
- package/dist/v1/enums.d.ts +12 -30
- package/dist/v1/enums.js +10 -15
- package/dist/v1/enums.js.map +1 -1
- package/dist/v1/types.d.ts +42 -42
- package/openapi/v1.json +1076 -673
- package/package.json +1 -1
- package/dist/fixtures/v1/quotes-create.response.private-swap.json +0 -153
- package/dist/fixtures/v1/quotes-create.response.public-swap.json +0 -159
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.9.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.9.0` or the exact `0.9.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,6 +30,86 @@ 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.8.0 -> 0.9.0
|
|
34
|
+
|
|
35
|
+
**BREAKING under 0.x semver** (breaking bumps the minor while the major is 0). Eleven wire
|
|
36
|
+
corrections from the /v1 API review, all in one release. Every renamed or removed field is a
|
|
37
|
+
400 on the request side (every request object is strict) and simply absent on the response
|
|
38
|
+
side. Read the whole list before bumping; the two structural items (7 and 8) need a code
|
|
39
|
+
change in every consumer.
|
|
40
|
+
|
|
41
|
+
**`V1_SCHEMA_DIGEST` MOVES** to
|
|
42
|
+
`bedfc6091a9af25adf1823740b6761f97bcb1927565bc3f226490bb2facda514`; it was
|
|
43
|
+
`a61dfe727b15162f9097b421ca2f7660750e8cfad85ccf2d1c8dd8340207852a` on `0.8.0`. Every consumer
|
|
44
|
+
running `assertNoSkew` moves in the same rollout.
|
|
45
|
+
|
|
46
|
+
**1. `swapType` is `type`** on the request and the response. Values are unchanged
|
|
47
|
+
(`exact-in`, `exact-out`, `custom`). Exports: `SWAP_TYPES`/`SwapType`/`SwapTypeTolerant`/
|
|
48
|
+
`V1SwapType` are now `QUOTE_TYPES`/`QuoteType`/`QuoteTypeTolerant`/`V1QuoteType`. The draft
|
|
49
|
+
`/v1/routes` response field `swapTypes` (a per-route capability list) keeps its name; only the
|
|
50
|
+
quote request and response are renamed.
|
|
51
|
+
|
|
52
|
+
**2. `kind` is `type` everywhere**: `fees[].type`, `steps[].type`,
|
|
53
|
+
`execution.transaction.type` (`'evm' | 'svm'`, the discriminated-union key), and the
|
|
54
|
+
deposit-address create request, record and lookup filter (`type: 'solana' | 'gateway' |
|
|
55
|
+
'gateway-erc20'`). Exports renamed accordingly (`FeeType`, `StepType`, `DepositAddressType`
|
|
56
|
+
and their tuples/tolerant twins/zod-free aliases). The API now has exactly one discriminator
|
|
57
|
+
name.
|
|
58
|
+
|
|
59
|
+
**3. `funder` is `source.funder`**, and the response echoes it at `source.funder`.
|
|
60
|
+
|
|
61
|
+
```diff
|
|
62
|
+
{
|
|
63
|
+
- "funder": "0x…",
|
|
64
|
+
- "source": { "chainId": 8453, "token": "0x…", "amount": "1043221" },
|
|
65
|
+
+ "source": { "chainId": 8453, "token": "0x…", "amount": "1043221", "funder": "0x…" },
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
A root `funder` yields two issues: `unrecognized_keys` at path `''` and a missing
|
|
70
|
+
`source.funder`. The address-family rule now reports at `['source', 'funder']`.
|
|
71
|
+
|
|
72
|
+
**4. `dappId` is REQUIRED** on every quote request (400 at `['dappId']` when missing).
|
|
73
|
+
|
|
74
|
+
**5. Response `destination.amount` is `destination.amountOut`.** `minAmountOut` is unchanged;
|
|
75
|
+
`source.amount` and both request amounts are unchanged.
|
|
76
|
+
|
|
77
|
+
**6. `steps[].tool` is `steps[].provider`.** `aggregator` is unchanged.
|
|
78
|
+
|
|
79
|
+
**7. `relatedIntents[]` is gone; each step carries `intents[]`** with the FULL decoded intent:
|
|
80
|
+
|
|
81
|
+
```json
|
|
82
|
+
"steps": [{ "type": "swap", "provider": "uniswap-v3", "…": "…",
|
|
83
|
+
"intents": [{ "role": "local", "intentHash": "0x…",
|
|
84
|
+
"intent": { "route": { "…": "…", "calls": [ … ] }, "reward": { … } } }] }]
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
`intents` is required on every step and may be empty (a step realized by a not-yet-existing
|
|
88
|
+
intent). Root `intentHash` stays. The quote signature (F3) commits to the root hash plus every
|
|
89
|
+
step intent hash — use the new `quoteIntentHashes(quote)` to collect them; the builder still
|
|
90
|
+
lower-cases, dedupes and sorts. Exports: `RelatedIntentSchema`/`V1RelatedIntent` are
|
|
91
|
+
`StepIntentSchema`/`V1StepIntent`.
|
|
92
|
+
|
|
93
|
+
**8. `visibility`, `guarantee`, `execution.encodedRoute` and `execution.encodedReward` are
|
|
94
|
+
removed**, and `execution.intent.route.calls` is REQUIRED and non-null. Visibility was never a
|
|
95
|
+
caller's knob: how a quote is routed is a router policy decision, and the funding function was
|
|
96
|
+
never visibility's to choose — on EVM the funding transaction is always `Portal.publishAndFund`;
|
|
97
|
+
on Solana it is one `Portal.fund` instruction. The route preimage is therefore never hidden.
|
|
98
|
+
`options.visibility` is a 400; `Visibility`/`VISIBILITIES`/`V1Visibility` and
|
|
99
|
+
`Guarantee`/`GUARANTEES`/`GuaranteeTolerant`/`V1Guarantee` no longer exist.
|
|
100
|
+
|
|
101
|
+
**9. Status `steps[].intentHash` is REQUIRED** (`Bytes32`). The solver has always sent it; the
|
|
102
|
+
schema now declares it. New golden fixture `intents.status:response:quote-filled-detail`.
|
|
103
|
+
|
|
104
|
+
**10. Fixtures renamed:** `quotes.create:request:public-swap` → `…:request:swap`,
|
|
105
|
+
`quotes.create:response:public-swap` → `…:response:swap`;
|
|
106
|
+
`…:response:private-swap` is deleted.
|
|
107
|
+
|
|
108
|
+
**11. The published OpenAPI document no longer carries `additionalProperties: {}`** on any
|
|
109
|
+
response object. Semantically identical (JSON Schema is permissive by default) — it only stops
|
|
110
|
+
documentation renderers drawing a `{key}: any` row. Request objects keep
|
|
111
|
+
`additionalProperties: false`. Runtime parsing is unchanged: responses stay `looseObject`.
|
|
112
|
+
|
|
33
113
|
## Migrating 0.7.0 -> 0.8.0
|
|
34
114
|
|
|
35
115
|
**BREAKING under 0.x semver** (breaking bumps the minor while the major is 0). V1 quote requests
|
|
@@ -493,14 +573,11 @@ wallet already works.
|
|
|
493
573
|
`InvalidTokenTransferAccounts` depending on which pair swapped). The schema does not know
|
|
494
574
|
which program `programId` is, so it cannot police this; it validates each entry's shape and
|
|
495
575
|
the PRESENCE of both privilege flags, and nothing more.
|
|
496
|
-
- **`instructions`
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
headers. The instructions are independent on-chain, so submit them in the given order across
|
|
502
|
-
two transactions, or compile a v0 message against your own address-lookup table. Splitting is
|
|
503
|
-
safe; reordering is not.
|
|
576
|
+
- **`instructions` is one instruction in practice.** Since 0.9.0 the router emits `Portal.fund`
|
|
577
|
+
alone on Solana (the route preimage stays with the quoting solver; there is no `publish`), so
|
|
578
|
+
a funding transaction fits one Solana transaction. The array stays ORDERED and non-empty so a
|
|
579
|
+
producer that legitimately needs a companion instruction can add one without a wire change;
|
|
580
|
+
compile them in the given order.
|
|
504
581
|
|
|
505
582
|
**No address-lookup-table references are emitted.** An ALT must already exist on-chain and
|
|
506
583
|
eco-router has no Solana RPC with which to create or read one, so every account is inline and
|
|
@@ -550,7 +627,7 @@ consuming.)
|
|
|
550
627
|
`errors` is **OPTIONAL**: an `invalid-request` for a body that is not JSON at all has no
|
|
551
628
|
field to name, so absence is legal and means exactly that. `field` names the offending
|
|
552
629
|
input in YOUR terms — the path into what you sent, with **no `body.`/`query.` prefix**:
|
|
553
|
-
`source.chainId`, `funder`, `limit`. `detail` obeys the same free-text policy as the
|
|
630
|
+
`source.chainId`, `source.funder`, `limit`. `detail` obeys the same free-text policy as the
|
|
554
631
|
problem's own `detail`.
|
|
555
632
|
|
|
556
633
|
Because there is no prefix, `field` alone does not say whether the value came from the body
|
|
@@ -876,7 +953,7 @@ There are two fixture locations and they serve different jobs — do not conflat
|
|
|
876
953
|
`routes.list` is the one fixture tagged `stability: 'draft'`. A live-replay consumer skips it
|
|
877
954
|
with the reason `draft endpoint (x-stability: draft) — not served at launch` instead of
|
|
878
955
|
demanding a 200 from an endpoint no service serves at launch, which makes the read-safe replay
|
|
879
|
-
set **
|
|
956
|
+
set **8 of the 9 GET fixtures**. Schema conformance still covers it in this package's own suite,
|
|
880
957
|
which needs no server.
|
|
881
958
|
|
|
882
959
|
## Invariants (enforced in CI)
|
package/dist/fixtures/index.js
CHANGED
|
@@ -12,22 +12,21 @@ const deposit_addresses_submit_erc_2612_request_deposit_address_target_json_1 =
|
|
|
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
13
|
const intents_status_response_gasless_handoff_json_1 = __importDefault(require("./v1/intents-status.response.gasless-handoff.json"));
|
|
14
14
|
const intents_status_response_intent_filled_json_1 = __importDefault(require("./v1/intents-status.response.intent-filled.json"));
|
|
15
|
+
const intents_status_response_quote_filled_detail_json_1 = __importDefault(require("./v1/intents-status.response.quote-filled-detail.json"));
|
|
15
16
|
const intents_status_response_unknown_json_1 = __importDefault(require("./v1/intents-status.response.unknown.json"));
|
|
16
17
|
const intents_status_response_wallet_page_json_1 = __importDefault(require("./v1/intents-status.response.wallet-page.json"));
|
|
17
18
|
const intents_submit_erc_3009_response_job_json_1 = __importDefault(require("./v1/intents-submit-erc-3009.response.job.json"));
|
|
18
19
|
const intents_submit_permit2_request_quote_target_json_1 = __importDefault(require("./v1/intents-submit-permit2.request.quote-target.json"));
|
|
19
20
|
const intents_submit_permit3_request_quote_target_json_1 = __importDefault(require("./v1/intents-submit-permit3.request.quote-target.json"));
|
|
20
|
-
const
|
|
21
|
+
const quotes_create_request_swap_json_1 = __importDefault(require("./v1/quotes-create.request.swap.json"));
|
|
21
22
|
const quotes_create_response_all_quotes_json_1 = __importDefault(require("./v1/quotes-create.response.all-quotes.json"));
|
|
22
|
-
const
|
|
23
|
-
const quotes_create_response_public_swap_json_1 = __importDefault(require("./v1/quotes-create.response.public-swap.json"));
|
|
23
|
+
const quotes_create_response_swap_json_1 = __importDefault(require("./v1/quotes-create.response.swap.json"));
|
|
24
24
|
const routes_list_response_default_json_1 = __importDefault(require("./v1/routes-list.response.default.json"));
|
|
25
25
|
const tokens_list_response_default_json_1 = __importDefault(require("./v1/tokens-list.response.default.json"));
|
|
26
26
|
const bind = (endpointId, direction, variant, json, meta = {}) => ({ endpointId, direction, variant, json, ...meta });
|
|
27
27
|
const FIXTURE_BINDINGS = [
|
|
28
|
-
bind('quotes.create', 'request', '
|
|
29
|
-
bind('quotes.create', 'response', '
|
|
30
|
-
bind('quotes.create', 'response', 'private-swap', quotes_create_response_private_swap_json_1.default),
|
|
28
|
+
bind('quotes.create', 'request', 'swap', quotes_create_request_swap_json_1.default),
|
|
29
|
+
bind('quotes.create', 'response', 'swap', quotes_create_response_swap_json_1.default),
|
|
31
30
|
bind('quotes.create', 'response', 'all-quotes', quotes_create_response_all_quotes_json_1.default),
|
|
32
31
|
bind('intents.submit.erc-3009', 'response', 'job', intents_submit_erc_3009_response_job_json_1.default),
|
|
33
32
|
bind('intents.submit.permit2', 'request', 'quote-target', intents_submit_permit2_request_quote_target_json_1.default),
|
|
@@ -38,6 +37,7 @@ const FIXTURE_BINDINGS = [
|
|
|
38
37
|
bind('intents.status', 'response', 'unknown', intents_status_response_unknown_json_1.default),
|
|
39
38
|
bind('intents.status', 'response', 'gasless-handoff', intents_status_response_gasless_handoff_json_1.default),
|
|
40
39
|
bind('intents.status', 'response', 'wallet-page', intents_status_response_wallet_page_json_1.default),
|
|
40
|
+
bind('intents.status', 'response', 'quote-filled-detail', intents_status_response_quote_filled_detail_json_1.default),
|
|
41
41
|
bind('chains.list', 'response', 'default', chains_list_response_default_json_1.default),
|
|
42
42
|
bind('tokens.list', 'response', 'default', tokens_list_response_default_json_1.default),
|
|
43
43
|
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,qIAA8E;AAC9E,iIAA2E;AAC3E,qHAAsE;AACtE,6HAAuE;AACvE,+HAA2E;AAC3E,6IAAkF;AAClF,6IAAkF;AAClF,
|
|
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,6IAAsF;AACtF,qHAAsE;AACtE,6HAAuE;AACvE,+HAA2E;AAC3E,6IAAkF;AAClF,6IAAkF;AAClF,2GAAiE;AACjE,yHAA0E;AAC1E,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;IACvD,IAAI,CAAC,eAAe,EAAE,UAAU,EAAE,MAAM,EAAE,0CAAc,CAAC;IACzD,IAAI,CAAC,eAAe,EAAE,UAAU,EAAE,YAAY,EAAE,gDAAe,CAAC;IAChE,IAAI,CAAC,yBAAy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+11,7 @@
|
|
|
11
11
|
"depositAddress": "0x4444444444444444444444444444444444444444",
|
|
12
12
|
"chainId": 8453,
|
|
13
13
|
"depositor": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb1",
|
|
14
|
-
"
|
|
14
|
+
"type": "gateway-erc20",
|
|
15
15
|
"destinationAddress": "0x1111111111111111111111111111111111111111",
|
|
16
16
|
"destinationChainId": 137,
|
|
17
17
|
"expiresAt": null,
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"depositAddress": "0x4444444444444444444444444444444444444444",
|
|
14
14
|
"chainId": 8453,
|
|
15
15
|
"depositor": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb1",
|
|
16
|
-
"
|
|
16
|
+
"type": "gateway-erc20",
|
|
17
17
|
"destinationAddress": "0x1111111111111111111111111111111111111111",
|
|
18
18
|
"destinationChainId": 137,
|
|
19
19
|
"expiresAt": null,
|
|
@@ -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
|
+
}
|
package/dist/fixtures/v1/{quotes-create.request.public-swap.json → quotes-create.request.swap.json}
RENAMED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"endpointId": "quotes.create",
|
|
3
3
|
"direction": "request",
|
|
4
|
-
"variant": "
|
|
4
|
+
"variant": "swap",
|
|
5
5
|
"method": "POST",
|
|
6
6
|
"path": "/v1/quotes",
|
|
7
7
|
"expectedStatus": 200,
|
|
8
8
|
"sideEffect": true,
|
|
9
9
|
"payload": {
|
|
10
|
-
"
|
|
10
|
+
"type": "exact-in",
|
|
11
11
|
"source": {
|
|
12
12
|
"chainId": 8453,
|
|
13
13
|
"token": "0x1111111111111111111111111111111111111111",
|
|
14
|
-
"amount": "1043221"
|
|
14
|
+
"amount": "1043221",
|
|
15
|
+
"funder": "0x3333333333333333333333333333333333333333"
|
|
15
16
|
},
|
|
16
17
|
"destination": {
|
|
17
18
|
"chainId": 10,
|
|
18
19
|
"token": "0x2222222222222222222222222222222222222222",
|
|
19
20
|
"recipient": "0x3333333333333333333333333333333333333333"
|
|
20
21
|
},
|
|
21
|
-
"funder": "0x3333333333333333333333333333333333333333",
|
|
22
22
|
"slippage": 0.005,
|
|
23
23
|
"dappId": "example-dapp"
|
|
24
24
|
}
|