Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: "This endpoint calculates the borrow quote for a liquidity transact
sidebar_label: "Borrow Quote API"
hide_title: true
hide_table_of_contents: true
api: eJzNVktv2zgQ/isETynAWEXRveiWtEERYNHudrOnIAdaHEtsKZIhh04MQ/99MaTkqI6aNlkUqA+2TM3jmwe/mT1XEJugPWpnec2vOh0ZWOWdtsgaaZpkJEJk2AFbuxDcHbtNDoFtXGCSGX2btNK4YxikjbIhO4Jp25iktG3neo2LKFiA26QDKKatT1i5hD6hYNIqplKQpL/ignsZZA8IIfL6en+E8q/g0DXOMCt7YCewaleCnTXBxfiKC65JxkvsuOAkQf9GDS74BIDXGBIIHpsOesnrPcedJ9mIQduWD4M49vt3jlya1gWNXc9IYXJ/cS8bvLQ5mPz8KUf2HTzZ1f/C8h4iapvzxT4C3rnwlV2+ZycuC0gjmIKNTAYjQ5fLYEepTXB9PiDvEJGtndodcN4mCLsHoKMSX8CmLUILgQ/DTYkEIp47tSORxlkEi/QovTe6yUCrL5Gw75+IcxBHcZ71LlmkGEobLWTt/jS+caduC8E4qabzgQSjdzZCJE9vXr+mn2+t/5OaBmLcJGN2LAAGDVtQ33Q6Fz8fjQ/OQ0BdPCqJC6fF9jsXcSF+wadLsPhyijz32ZMSpfsWO2mWv+s5mpnvY0+P7N6Iya5bf4EGH9nNsS9IkdzbpUqcS3VoSJWACq7tVho9MgVzgfU6RiKVGTm8vDiwTu1iCiEEF36cuWJgEv9OqH8shXppEYKVhkUIWwisWPitIxkER9kSF/M/J8onyXL17mSwZLjmnzyUFmItYF0dxkM1EXC1n56GitxUe/oeqjJUOhlZnwxqbw70dO4UBSo43CPYqJ0tI+Er7Hh9BEDwrTQJfikQYrsesHOK17wFzMMKO17z53ohUs0dUAJKwfCad4g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---
Expand Down Expand Up @@ -54,42 +54,65 @@ See the [Request Final Borrow Quote example payload](/Stash/use-stash#3-request-
description:
"destChainID must use capid format from our configuration <br />-eip155:8453(Base),<br />-eip155:10 (Optimism),<br />-eip155:42161 (Arbitrum)",
in: "path",
name: "destChainId",
name: "chain",
required: true,
schema: { type: "string" },
schema: { type: "string", example: "eip155:8453" },
},
{
description: "Protocol name - across, mayan",
in: "path",
name: "protocol",
required: true,
schema: { type: "string" },
schema: { type: "string", example: "mayan" },
},
{
description:
"Quote algorithm type: <br /><br /> ExactInput - Request will consider the amount as (input amount - borrow costs) <br /><br /> ExactOutput - Request will consider the amount as (output amount + borrow costs) ",
in: "path",
name: "type",
required: true,
schema: { type: "string" },
},
{
description:
"Destination Network ID (optional, defaults to the network from the request body)",
in: "query",
name: "network",
schema: { type: "integer" },
schema: { type: "string", example: "ExactOutput" },
},
]}
></ParamsDetails>

<RequestSchema
title={"Body"}
body={{
content: { "application/json": { schema: { type: "string" } } },
description: "Amount to borrow",
content: {
"application/json": {
schema: {
properties: {
amount: {
description:
"amount of tokens for which we are requesting borrow quote (in the smallest denomination)",
example: "49805421",
type: "string",
},
exclusive_fill: {
description: "boolean representing if you have exclusivity to fill this quote",
example: false,
type: "boolean",
},
network: {
description: "caip formated network id",
example: "eip155:1",
type: "string",
},
token: {
description: "token address (hex)",
example: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
type: "string",
format: "hex",
},
},
required: ["amount", "exclusive_fill", "network", "token"],
type: "object",
},
},
},
description: "Borrow quote request payload",
required: true,
"x-s2o-overloaded": true,
}}
></RequestSchema>

Expand All @@ -98,7 +121,7 @@ See the [Request Final Borrow Quote example payload](/Stash/use-stash#3-request-
label={undefined}
responses={{
"200": {
description: "Successfully retrieved borrow quote",
description: 'Successfully retrieved borrow quote".',
content: {
"application/json": {
schema: {
Expand All @@ -107,10 +130,39 @@ See the [Request Final Borrow Quote example payload](/Stash/use-stash#3-request-
properties: {
borrowCost: { type: "string" },
duration: { type: "string" },
liquidityPool: { type: "string" },
repaymentChain: {
enum: [1, 42161, 10, 137, 8453, 43114, 100, 8333, 11155111, 1993, 19934, 84532],
format: "int32",
type: "integer",
"x-enum-varnames": [
"Ethereum",
"Arbitrum",
"Optimism",
"Polygon",
"Base",
"Avalanche",
"Gnosis",
"B3",
"Sepolia",
"B3Sepolia",
"B4Sepolia",
"BaseSepolia",
],
},
repaymentRecipient: { type: "string" },
requiredInput: { type: "string" },
requiredOutput: { type: "string" },
},
required: ["borrowCost", "duration", "requiredInput", "requiredOutput"],
required: [
"borrowCost",
"duration",
"liquidityPool",
"repaymentChain",
"repaymentRecipient",
"requiredInput",
"requiredOutput",
],
type: "object",
},
},
Expand All @@ -121,30 +173,30 @@ See the [Request Final Borrow Quote example payload](/Stash/use-stash#3-request-
},
},
"400": {
description: "Bad request due to invalid input or missing parameters",
description: 'Bad request due to invalid input or missing parameters".',
content: {
"application/json": {
schema: {
properties: {
debug: { type: "string" },
error: { type: "string" },
},
required: ["debug", "error"],
required: ["error"],
type: "object",
},
},
},
},
"500": {
description: "Internal server error",
description: 'Internal server error".',
content: {
"application/json": {
schema: {
properties: {
debug: { type: "string" },
error: { type: "string" },
},
required: ["debug", "error"],
required: ["error"],
type: "object",
},
},
Expand Down
27 changes: 27 additions & 0 deletions docs/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,33 @@ const config: Config = {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
},
languageTabs: [
{
language: "curl",
highlight: "bash",
logoClass: "curl",
},
{
language: "go",
highlight: "go",
logoClass: "go",
},
{
language: "javascript",
highlight: "javascript",
logoClass: "javascript",
},
{
language: "csharp",
highlight: "csharp",
logoClass: "csharp",
},
{
language: "java",
highlight: "java",
logoClass: "java",
},
],
} satisfies Preset.ThemeConfig,
plugins: [
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
id: get-the-borrow-cost-for-a-liquidity-transaction
title: "Get the borrow cost for a liquidity transaction"
description: "Get the borrow cost for a liquidity transaction"
sidebar_label: "Get the borrow cost for a liquidity transaction"
id: get-signing-authorization-for-a-liquidity-transaction
title: "Get signing authorization for a liquidity transaction"
description: "This endpoint returns signed authorization for a liquidity transaction"
sidebar_label: "Get signing authorization for a liquidity transaction"
hide_title: true
hide_table_of_contents: true
api: eJzNVk2P2zgM/SsCTy2gGRdF9+Jbpyi6xRZoUcyeghwYm2OrK0saiZ4kMPzfC/pj4mS9s505LDaXyDJFPpJPj+6gpFREE9h4Bzl8IlZck9r5GP1eFT6xuvNRobLmvjWl4aPiiC5hMZzQEDBiQ0wxQb7pLtx9i5594S1oMPIckGvQ4LAheTq9jXTfmkgl5Bxb0pCKmhqEvAM+BrFNHI2roO/1ZYzbExxVY6oHvJJDScEnw+ux+fA7pvpZkbejMSW+8eVRLArvmBzLEkOwpkBBkf1IAqx7wlWvL5IwLrSsSmRUryJZPA7r1yv4Dlfprb/yDxStx3Le78UwBe8SJQn49s0b+TsP8vUP0L+O+fzszYIQiWNbcBtJ7Q3XCtXOVNefHatIIVIix1QqTGpKV0ujA0U2I7aRWx984pXSaHgk2jfv7aqF866g1TfJVA4F2SpzFrXcLFFcxpwjLP1t9ezP735QwdLEXsO7tTrfYKkmpqiyJcVeGfeA1pRq7LOPqjEpGVepxfV5Rm/OC1rSrq1W60Ex+vjvtRgdzOb/kOpva6l+dkzRoVWJ4gNFNXr4X2fSa2CsRK3gy9x2sRwv1h6jE8c5fA0UB9SqIs6zR4pks2xl3bzqs0lrsm7UlT6b+19jUk1r2QRL6iQfkq8GOjC5ZLwbtfMvOkJ+gUPDA9qW/gs8InANce1LyKEiHsSda8jhhcHkAg20GNNro4UcauaQ8izDYK5TiEYIdL1rjS1FTNKxavC68E02wBG+fD9p7scDNsEu2i/SfudnKcZCCCf9NTxYSfUoppGqwqLgEzc4UHCaA88feGcXYDEDXuBqIifTgbNg0TjBOJSpm0q/OUnTqKPzwMwX69Ogy8/GmrRgq6EelHYDXbf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cFH7iFRdR4rH5HT3JZefc7gPmmXo8ny/a4GM9MZt1yGTobfVOQajvM5rQ66Jq05D8hqPqus4/srQnW0Poz26mSQy5HdFrpNQr7S47iGiL9RN03y+n5A2ulqdSuUJQtrKbHcWWyUtdHVHXQRnyjNqy9zR79WR1ebxTznl+B2Rx2ii7mFHnNJt4qXxP+Ga88LcM3VfDGqp65EL4CTGTHdToVuEQzSkQq9z/EvbsTDYe9fRF1yyTve1TUGftL2WFA+frhJUzjfvHpvZAvBRrgGmwzTp3KkCZHejboD1wzQiG12Kb8/Ac2uDZw=
sidebar_class_name: "get api-method"
custom_edit_url: null
---
Expand All @@ -21,16 +21,18 @@ import Heading from "@theme/Heading";
<Heading
as={"h1"}
className={"openapi__heading"}
children={"Get the borrow cost for a liquidity transaction"}
children={"Get signing authorization for a liquidity transaction"}
></Heading>

<MethodEndpoint
method={"get"}
path={"/liquidity/protocol/{protocol}/deposit/{txHash}/request"}
path={
"/liquidity/chain/{chainId}/protocol/{protocol}/deposit/{txHash}/request"
}
context={"endpoint"}
></MethodEndpoint>

Get the borrow cost for a liquidity transaction
This endpoint returns signed authorization for a liquidity transaction

<Heading
id={"request"}
Expand All @@ -55,6 +57,13 @@ Get the borrow cost for a liquidity transaction
required: true,
schema: { type: "string" },
},
{
description: "Destination chain caip id",
in: "path",
name: "chain",
required: true,
schema: { type: "string" },
},
]}
></ParamsDetails>

Expand All @@ -80,12 +89,19 @@ Get the borrow cost for a liquidity transaction
description:
"Borrow cost structure with a big.Int represented as string",
properties: {
borrowAmount: { type: "string" },
borrowCost: { type: "string" },
liquidityPool: { type: "string" },
nonce: { type: "string" },
signature: { type: "string" },
},
required: ["borrowCost", "liquidityPool", "nonce", "signature"],
required: [
"borrowAmount",
"borrowCost",
"liquidityPool",
"nonce",
"signature",
],
type: "object",
},
},
Expand All @@ -100,7 +116,7 @@ Get the borrow cost for a liquidity transaction
debug: { type: "string" },
error: { type: "string" },
},
required: ["debug", "error"],
required: ["error"],
type: "object",
},
},
Expand All @@ -115,7 +131,7 @@ Get the borrow cost for a liquidity transaction
debug: { type: "string" },
error: { type: "string" },
},
required: ["debug", "error"],
required: ["error"],
type: "object",
},
},
Expand Down
Loading