Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
ccd7907
feat: add docusaurus-plugin-openapi-docs and first basic page
alexshchur May 12, 2025
973bd70
feat: example values; bind to prod API url;
alexshchur May 12, 2025
f988fa0
fix: visually better separation between parameters
alexshchur May 12, 2025
6a185ba
fix: hide options, just curl
alexshchur May 12, 2025
c8859ed
chore: change naming
alexshchur May 12, 2025
f23f8c4
chore: cleanup
alexshchur May 12, 2025
c49b60d
chore: cleanup
alexshchur May 12, 2025
1386eee
feat: better navigation
alexshchur May 12, 2025
09c2628
feat: beter navigation
alexshchur May 12, 2025
6aa0c21
chore: cleanup
alexshchur May 12, 2025
cdaebbc
feat: nicer navigation
alexshchur May 12, 2025
e175995
chore: cleanup
alexshchur May 12, 2025
2c9e30b
fix: cleanup redundant logo
alexshchur May 12, 2025
24e8b0a
feat: theme-specific logo
alexshchur May 12, 2025
242f299
fix: improve folder strucutre and align auto-gen
alexshchur May 12, 2025
1de2b16
fix: small naming improv
alexshchur May 12, 2025
fc777cd
chore: cleanup
alexshchur May 12, 2025
f45ba68
fix: explicit ordering
alexshchur May 12, 2025
9a07707
feat: REQUEST section collapsed by default; also hide Base URL
alexshchur May 12, 2025
59560d2
chore: more specific naming
alexshchur May 12, 2025
a7abac1
feat: add examples to GET delta/price response
alexshchur May 12, 2025
e9c46a6
feat: generate with samples
alexshchur May 12, 2025
6ccf27e
feat: add bridge-info endpoint
alexshchur May 12, 2025
adf45a7
improve docs
alexshchur May 12, 2025
06115bf
chore: cleanup
alexshchur May 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions velora-sdk-docs/docs/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Velora SDK
sidebar_position: 10
---
<!-- <p align="center">
<a href="https://www.velora.xyz/">
<picture>
Expand All @@ -6,7 +10,7 @@
</picture>
</a>
</p> -->
<p align="center">
<!-- <p align="center">
<a href="https://www.velora.xyz/" target="_blank">
import ThemedImage from '@theme/ThemedImage';

Expand All @@ -20,7 +24,7 @@ import ThemedImage from '@theme/ThemedImage';
}}
/>
</a>
</p>
</p> -->

# SDK for the Velora API

Expand Down
5 changes: 5 additions & 0 deletions velora-sdk-docs/docs/delta-api/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"label": "Delta API",
"collapsed": false,
"position": 20
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
id: get-delta-prices-bridge-info
title: "GET delta/prices/bridge-info"
description: "Returns info on supported source destination chains and destination tokens for cross-chain orders."
sidebar_label: "GET delta/prices/bridge-info"
hide_title: true
hide_table_of_contents: true
api: eJztVU1v2zgQ/SsEz6pNivogfZNluegt2Gb3kgToiBzFamxJJek0geH/viCdpnGTXTS3PSwPtjF+M/M4w3lzoAadtv3k+3GgC/oH+r0dHOmHbiTjQNx+mkbr0RA37q1GYtD5foAAJ3oD/eAIDObM7Mc7HBzpRku0HZ37EHFktAatm10P18PlBokBD8R5u9d+b5H0jgAZ0IVUptchENhH8n2DFonfIJlsvwuWO3x0BCySLydGdQj+yXwh97Ddo0sineDgUI+DOXd5QfMXvxlpQG+IHnftj3uM3ascIfabQXYwOeJHAmTbOx9cf1Yu1oOAMRadQxfKGvi9quSrinkLg4NYi1A3mlCLbhoHh44uDjRlLHydN/DzedrXbXDfYXI0oXocPA4+RIBp2vY6Mpl/dSHMgTq9wR2EX/5xQrqgY/sVtacJnew4ofX9icTzNS9jurccwJg+9nN7ceb6ThxYC480ob3H3Uu787YfbmlC8QF20zaY2EOWst85BT3G88L5zSvx+MHo4uo9sRPKHvA3TwSzNq0LoXQuhOSiyypQq1KKsq66Ii1yYZgq153MI7hc57osMr3UPOtUUaillFKUGnimmK6Bl1rwgpURXMiOS9bpGgspikJKVExmHRO5YKpJ1bJjVcpUTm8SykV5umipcZmKblW0NQOzylVTpKDTPC9lWjK97niruoKrmEHoTCmdZ6lu1nkjJOfIuUo1lsxIXTNhci1EfgKnpeJLDbxLDWZFwZuVlJVgtVJVCSrLVAUy42UW6Ig0O9HJqwbyssxVrrplHWjUWpZStTVvO8WqVKiVAsXfX3ch8tx0xSrTqhZM5GWarQ1DoXhmGlVUOUgB0GX05pjEZxBfROBUsxSgEqpNU7Fu5IpVDPM6W6clVivFpKjLvKh1+n5OFWtloRTXRcplKwrNDVerDFJUTct0IwpW4DKT9Ob44w3v0G9GQxf0FuOggt/QBZ0b3HqYT7bX6Oat7c0tfgj6ThPq0N6jdXRxdaB7u6ULuvF+cov5HKZ+NoGFIBezPmDPdeYv3I4WSHXxiR5vEhrjhZnsfZzAp79XIXUEJTQkOvnyGZuxf4r47HJaCYFhr8MKAE8mO973Bl1YBrofbqMen25Evu1Hjye5OwluFDqydwF3ARY+f4fpFH1GCCHXAz0mdBqd30FUvAF2gfnH5pL8S8XOOB9+quj/m/O/vTmfloXHBz+fttDH7scnf3galCsa2x43XGg8TejL1t8kdDM6H3CHQwsO/7Tb4zGYv+3RPtLF1U1C78H20IYJuApSsUEwaON03eEjXdBKa5zCbMbShaX26+oNw/Q8xx+bS3o8/g0w4jOp
sidebar_class_name: "get api-method"
info_path: delta-api/velora-delta-api
custom_edit_url: null
---

import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";

<Heading
as={"h1"}
className={"openapi__heading"}
children={"GET delta/prices/bridge-info"}
>
</Heading>

<MethodEndpoint
method={"get"}
path={"/delta/prices/bridge-info"}
context={"endpoint"}
>

</MethodEndpoint>



Returns info on supported source destination chains and destination tokens for cross-chain orders.

The data structure is a nested dictionary where the primary keys are `sourceChainId` values, and the secondary keys are `destinationChainId` values. Each combination of `sourceChainId` and `destinationChainId` maps to a list of supported token addresses on the destination chain for cross-chain transactions.


<ParamsDetails
parameters={undefined}
>

</ParamsDetails>

<RequestSchema
title={"Body"}
body={undefined}
>

</RequestSchema>

<StatusCodes
id={undefined}
label={undefined}
responses={{"200":{"description":"Supported tokens for cross-chain swaps","content":{"application/json":{"schema":{"type":"object","properties":{"supportedTokens":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string","example":"0x4200000000000000000000000000000000000006"}}}}}},"example":{"supportedTokens":{"1":{"10":["0x4200000000000000000000000000000000000006","0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee","0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85","0x7F5c764cBc14f9669B88837ca1490cCa17c31607","0x68f180fcCe6836688e9084f035309E29Bf0A2095"],"137":["0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619","0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359","0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174"],"324":["0x5AEa5775959fBC2557Cc8789bC1bf90A239D9a91","0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee","0x3355df6D4c9C3035724Fd0e3914dE96A5a83aaf4"]},"10":{"1":["0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2","0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee","0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"]}}}}}}}}
>

</StatusCodes>



72 changes: 72 additions & 0 deletions velora-sdk-docs/docs/delta-api/get-delta-prices.api.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---
id: get-delta-prices
title: "GET delta/prices"
description: "Returns pricing and bridge quote for a token swap using Velora Delta."
sidebar_label: "GET delta/prices"
hide_title: true
hide_table_of_contents: true
api: eJzdV99v2zgM/lcEPW1AmkiyJVt5S5dsGLCHYWsPOLR9kCWm8ebYnqR0LYL87wfJaZqsP+Idrnu4AK3h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T1miGM9MTos0ZURyRZXQYBKuY1QWS6VfxitYxkzCUq1EZoAVBIBzQfPCqEzRNGHMGEUN4M0mRrnyqqefZPcpijnXfG5YnoLg2ZzQwhBCZJJoKUxA3kT0JfhFY/AYX0NkXOUXeIwPWkrotWBv7qflla3wGC+8b914NFJtOTwcDw4bxnb4nnz+GDtM6DbxEKWPLu/P5lFogIOhTpcOyZA8h7hTiW0SBQ9Da/IL5VFrm5vSwPOrgott+WFTcNtV4bOy6mvYHLplASGEQmsMteL8UsUusR0tQuf9JUoHfq4fuuN/uLlsk+/h1o/aSpXRuZiR9TZ3F13BxO4Z/boa4EWk6Au8XhfKwbmtNpvwdTcKhZya0qmi2huGnj3Kmy/buektes6d73B3uE3dqGoVxHCYzF7B1P7W9Nq2dtvRaxs6XJP+RAj/oLmHTerVw9jtVi+b6UQf9qI+0ocbzr88xv9leThaW++eSPhVeLFlCBUeX1yF1gnKhLHnYr1VnWgN7f5te7RmBJRdD/swO8ObzT8rOv1H
sidebar_class_name: "get api-method"
info_path: delta-api/velora-delta-api
custom_edit_url: null
---

import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";

<Heading
as={"h1"}
className={"openapi__heading"}
children={"GET delta/prices"}
>
</Heading>

<MethodEndpoint
method={"get"}
path={"/delta/prices"}
context={"endpoint"}
>

</MethodEndpoint>



Returns pricing and bridge quote for a token swap using Velora Delta.


<Heading
id={"request"}
as={"h2"}
className={"openapi-tabs__heading"}
children={"Request"}
>
</Heading>

<ParamsDetails
parameters={[{"name":"srcToken","in":"query","required":true,"example":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","schema":{"type":"string"}},{"name":"destToken","in":"query","required":true,"example":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE","schema":{"type":"string"}},{"name":"amount","in":"query","required":true,"example":"100000000","schema":{"type":"string"}},{"name":"srcDecimals","in":"query","required":true,"example":6,"schema":{"type":"integer"}},{"name":"destDecimals","in":"query","required":true,"example":18,"schema":{"type":"integer"}},{"name":"chainId","in":"query","required":true,"example":1,"schema":{"type":"integer"}},{"name":"side","in":"query","required":true,"example":"SELL","schema":{"type":"string","enum":["BUY","SELL"]}},{"name":"partner","in":"query","required":false,"example":"paraswap.io","schema":{"type":"string"}},{"name":"userAddress","in":"query","required":false,"example":"0xb0326588271F2531FBfc9A13D52d3DA45bE1D956","schema":{"type":"string"}},{"name":"destChainId","in":"query","required":false,"example":10,"schema":{"type":"integer"},"description":"The ID of the destination chain for cross-chain swaps. \nTo check if the destination token is allowed by our bridge, visit:\n[GET /delta/prices/bridge-info](/delta-api/get-delta-prices-bridge-info)\n"}]}
>

</ParamsDetails>

<RequestSchema
title={"Body"}
body={undefined}
>

</RequestSchema>

<StatusCodes
id={undefined}
label={undefined}
responses={{"200":{"description":"Price quote","content":{"application/json":{"schema":{"type":"object","properties":{"price":{"type":"object","properties":{"srcToken":{"type":"string","example":"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"},"destToken":{"type":"string","example":"0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"},"srcAmount":{"type":"string","example":"100000000"},"destAmount":{"type":"string","example":"37591850998965865"},"destAmountBeforeFee":{"type":"string","example":"38997869046172601"},"gasCostUSD":{"type":"string","example":"3.601698"},"gasCost":{"type":"string","example":"311705"},"srcUSD":{"type":"string","example":"99.9992"},"destUSD":{"type":"string","example":"96.2964132847"},"destUSDBeforeFee":{"type":"string","example":"99.89811128474712"},"gasCostBeforeFee":{"type":"string","example":"107278"},"gasCostUSDBeforeFee":{"type":"string","example":"1.2395794798762825"},"partner":{"type":"string","example":"paraswap.io"},"partnerFee":{"type":"number","example":0},"destAmountAfterBridge":{"type":"string","example":"37587921614310165"},"destUSDAfterBridge":{"type":"string","example":"96.28634764486536"},"bridgeFee":{"type":"string","example":"3929384655698"},"bridgeFeeUSD":{"type":"string","example":"0.010065629615575668"},"poolAddress":{"type":"string","example":"0x5c7bcd6e7de5423a257d81b442095a1a6ced35c5"},"hmac":{"type":"string","example":"b272d324ca67de2b0ee55618bda7a14322dda1de"}}},"deltaAddress":{"type":"string","example":"0x0000000000bbf5c5fd284e657f01bd000933c96d"}}}}}}}}
>

</StatusCodes>



30 changes: 30 additions & 0 deletions velora-sdk-docs/docs/delta-api/sidebar.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import type { SidebarsConfig } from "@docusaurus/plugin-content-docs";

const sidebar: SidebarsConfig = {
apisidebar: [
{
type: "doc",
id: "delta-api/velora-delta-api",
},
{
type: "category",
label: "UNTAGGED",
items: [
{
type: "doc",
id: "delta-api/get-delta-prices",
label: "GET delta/prices",
className: "api-method get",
},
{
type: "doc",
id: "delta-api/get-delta-prices-bridge-info",
label: "GET delta/prices/bridge-info",
className: "api-method get",
},
],
},
],
};

export default sidebar.apisidebar;
47 changes: 0 additions & 47 deletions velora-sdk-docs/docs/intro.md

This file was deleted.

8 changes: 0 additions & 8 deletions velora-sdk-docs/docs/tutorial-basics/_category_.json

This file was deleted.

23 changes: 0 additions & 23 deletions velora-sdk-docs/docs/tutorial-basics/congratulations.md

This file was deleted.

34 changes: 0 additions & 34 deletions velora-sdk-docs/docs/tutorial-basics/create-a-blog-post.md

This file was deleted.

57 changes: 0 additions & 57 deletions velora-sdk-docs/docs/tutorial-basics/create-a-document.md

This file was deleted.

Loading
Loading