Skip to content
Open
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
106 changes: 57 additions & 49 deletions docs.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://mintlify.com/docs.json",
"theme": "maple",
"theme": "mint",
"name": "NEAR Intents",
"colors": {
"primary": "#fb4d01",
Expand All @@ -11,62 +11,22 @@
"navigation": {
"tabs": [
{
"tab": "Swaps",
"tab": "Overview",
"groups": [
{
{
"group": "Welcome",
"hidden": true,
"pages": [
"/index"
]
},
{
"group": "Intents",
"group": " ",
"pages": [
"/getting-started/what-are-intents",
"/resources/chain-support"
]
},
{
"group": "Swap API",
"openapi": "https://1click.chaindefuser.com/docs/v0/openapi.yaml",
"pages": [
"integration/distribution-channels/1click-api/about-1click-api",
"integration/distribution-channels/1click-api/quickstart",
"integration/distribution-channels/1click-api/sdk",
"integration/distribution-channels/1click-api/authentication",
"integration/distribution-channels/1click-api/fee-config",
{
"group": "API Reference",
"icon": "code",
"pages": [
"GET /v0/tokens",
"POST /v0/quote",
"GET /v0/status",
"GET /v0/any-input/withdrawals",
"POST /v0/deposit/submit"
]
},
{
"group": "Explorer API",
"root": "integration/distribution-channels/1click-api/explorer/introduction",
"icon": "magnifying-glass-chart",
"openapi": "https://explorer.near-intents.org/api/v0/openapi.yaml",
"pages": [
"GET /api/v0/transactions",
"GET /api/v0/transactions-pages"
]
}
]
},
{
"group": "Developer ToolKit",
"pages": [
"integration/devkit/react-widget",
"integration/devkit/intents-sdk",
"integration/devkit/skills"
]
},
{
"group": "Resources",
"pages": [
Expand All @@ -86,11 +46,59 @@
}
]
},
{
"tab": "API Reference",
"groups": [
{
"group": " ",
"pages": [
"integration/distribution-channels/1click-api/about-1click-api",
"integration/distribution-channels/1click-api/quickstart",
"integration/distribution-channels/1click-api/authentication",
"integration/distribution-channels/1click-api/fee-config"
]
},
Comment on lines +52 to +60
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Use named nested groups with icons instead of blank group placeholders.

Using "group": " " and icon-less groups in new sections diverges from the navigation standard and makes sidebar structure less clear.

As per coding guidelines, "Use nested groups with Font Awesome icons for navigation in docs.json."

Also applies to: 79-87

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs.json` around lines 45 - 53, Replace the blank group placeholders in the
docs JSON (the "group": " " objects) with named nested group entries that
include a Font Awesome icon and explicit label; e.g., change the object
containing pages like
"integration/distribution-channels/1click-api/about-1click-api" to have "group":
"1Click API", add an "icon": "fas fa-something" (choose an appropriate FA icon),
and if desired wrap pages under a nested "items" or "pages" array according to
existing nav schema; repeat the same refactor for the other occurrence
referenced (the block around lines 79-87) so all group objects use named groups
and include "icon" keys to conform to the navigation standard.

{
"group": "API Reference",
"openapi": "https://1click.chaindefuser.com/docs/v0/openapi.yaml",
"pages": [
"GET /v0/tokens",
"POST /v0/quote",
"GET /v0/status",
"GET /v0/any-input/withdrawals",
"POST /v0/deposit/submit"
]
},
{
"group": "Explorer API",
"openapi": "https://explorer.near-intents.org/api/v0/openapi.yaml",
"pages": [
"integration/distribution-channels/1click-api/explorer/introduction",
"GET /api/v0/transactions",
"GET /api/v0/transactions-pages"
]
}
]
},
{
"tab": "Dev Toolkit",
"groups": [
{
"group": " ",
"pages": [
"integration/devkit/react-widget",
"integration/distribution-channels/1click-api/sdk",
"integration/devkit/intents-sdk",
"integration/devkit/skills"
]
}
]
},
{
"tab": "Market Makers",
"groups": [
{
"group": "Market Makers",
"group": " ",
"pages": [
"integration/market-makers/introduction",
"integration/market-makers/quickstart",
Expand All @@ -112,7 +120,7 @@
"tab": "Bridges",
"groups": [
{
"group": "Bridges",
"group": " ",
"pages": [
"integration/bridging/overview",
"integration/market-makers/deposit-withdrawal-service"
Expand All @@ -124,7 +132,7 @@
"tab": "Verifier Contract",
"groups": [
{
"group": "Verifier Contract",
"group": " ",
"pages": [
"integration/verifier-contract/introduction",
"integration/verifier-contract/account-abstraction"
Expand Down Expand Up @@ -160,7 +168,7 @@
"navbar": {
"links": [
{
"label": "System Status",
"label": "Status",
"href": "https://status.near-intents.org/posts/dashboard"
},
{
Expand Down Expand Up @@ -227,7 +235,7 @@
},
{
"source": "/near-intents/integration/distribution-channels/intents-explorer-api",
"destination": "/integration/distribution-channels/1click-api/explorer/introduction"
"destination": "/api-reference/explorer/introduction"
},
{
"source": "/near-intents/market-makers",
Expand Down
184 changes: 31 additions & 153 deletions index.mdx
Original file line number Diff line number Diff line change
@@ -1,173 +1,51 @@
---
hidden: true
mode: "wide"
mode: "custom"
---

<div class="landing-page">
<div class="my-auto w-full">

<h1 class="text-center mt-0 mb-1"> NEAR Intents </h1>
<div class="mb-8 text-lg text-center prose prose-gray dark:prose-invert"><p>Welcome to the NEAR Intents Docs</p></div>
<h1 className="text-center text-4xl font-semibold tracking-tight text-gray-800 dark:text-white pt-9">
NEAR Intents Documentation
</h1>

<div class="landing pt-8 max-w-6xl mx-auto landing-sections">
<Columns cols={2}>
<div class="mr-4">
<h2 class="mb-2"> 1-Click Swap API </h2>
<p >Request quotes, execute cross-chain swaps, and track their status. </p>
<p><a href="/integration/distribution-channels/1click-api/quickstart"> Quickstart -> </a></p>
<p><a href="/integration/distribution-channels/1click-api/about-1click-api"> Learn More -> </a></p>
</div>
<CodeGroup>
```bash cURL
# Query supported tokens
curl https://1click.chaindefuser.com/v0/tokens
<div class="landing pt-5 max-w-6xl mx-auto space-y-2">

# Request a quote
curl -X POST https://1click.chaindefuser.com/v0/quote \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-d '{
"swapType": "EXACT_INPUT",
"originAsset": "nep141:wrap.near",
"depositType": "ORIGIN_CHAIN",
"destinationAsset": "nep141:arb-0x912ce59144191c1204e64559fe8253a0e49e6548.omft.near",
"amount": "100000000000000000000000",
...
}'
```
<Columns cols={4}>
<Card title="API Quickstart" icon="rocket" href="/integration/distribution-channels/1click-api/quickstart" cta="Integrate" arrow>
Execute your first cross-chain swap in minutes.
</Card>

```typescript TypeScript
// Query supported tokens
const tokensResponse = await fetch('https://1click.chaindefuser.com/v0/tokens');
const tokens = await tokensResponse.json();
<Card title="React Widget" icon="palette" href="/integration/devkit/react-widget" cta="Integrate" arrow>
Embed a customizable swap UI with a ready-to-use React component.
</Card>

// Request a quote
const quote = await fetch('https://1click.chaindefuser.com/v0/quote', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_JWT_TOKEN'
},
body: JSON.stringify({
swapType: 'EXACT_INPUT',
originAsset: 'nep141:wrap.near',
depositType: 'ORIGIN_CHAIN',
destinationAsset: 'nep141:arb-0x912ce59144191c1204e64559fe8253a0e49e6548.omft.near',
amount: '100000000000000000000000',
// ...
})
});
const result = await quote.json();
```
<Card title="SDK Libraries" icon="window-restore" href="/integration/distribution-channels/1click-api/sdk" cta="Explore" arrow>
Build with TypeScript, Go, and Rust SDKs for typed API integration.
</Card>

```python Python
import requests

# Query supported tokens
tokens_response = requests.get('https://1click.chaindefuser.com/v0/tokens')
tokens = tokens_response.json()

# Request a quote
quote = requests.post(
'https://1click.chaindefuser.com/v0/quote',
headers={
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_JWT_TOKEN'
},
json={
'swapType': 'EXACT_INPUT',
'originAsset': 'nep141:wrap.near',
'depositType': 'ORIGIN_CHAIN',
'destinationAsset': 'nep141:arb-0x912ce59144191c1204e64559fe8253a0e49e6548.omft.near',
'amount': '100000000000000000000000',
# ...
}
)
result = quote.json()
```
</CodeGroup>
</Columns>

<div class="pb-8">
<Card title="What are intents?" icon="lightbulb" href="/getting-started/what-are-intents" cta="Read docs" arrow>
Learn how the protocol works and core concepts.
</Card>
</Columns>
<Callout color="#ff7043">
<p class="text-center">
AI Agent Skills: `npx skills add near/agent-skills --skill near-intents`
</p>
</Callout>
</div>

<Columns cols={2}>
<img src="/images/widget/swap-widget.png" alt="Swap Widget UI" class="rounded-lg border border-gray-950/10 dark:border-white/10 swap-widget-preview" />
<div>
<h2 class="mb-2"> React Widget </h2>
<p>Integrate a customizable, cross-chain swap interface into your app with just a few lines of code.</p>
<p><a href="/integration/devkit/react-widget"> Learn More -> </a></p>
</div>

</Columns>

<Columns cols={2}>
<div class="mr-4">
<h2 class="mb-2"> SDK Libraries </h2>
<p>Use SDKs for TypeScript, Go, and Rust to request quotes, submit deposits, and monitor execution status.</p>
<p><a href="/integration/distribution-channels/1click-api/sdk"> Learn More -> </a></p>
</div>
<CodeGroup>
```typescript TypeScript
import { OpenAPI, OneClickService } from '@defuse-protocol/one-click-sdk-typescript';

OpenAPI.TOKEN = 'YOUR_JWT_TOKEN';

const tokens = await OneClickService.getTokens();
console.log(tokens.length);
```
<Columns cols={2}>
<Card title="Market Makers" icon="users" href="/integration/market-makers/introduction" cta="Learn how" arrow>
Provide liquidity by fulfilling cross-chain swap intents.
</Card>

```go Go
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
<Card title="Verifier Contract" icon="credit-card" href="/integration/verifier-contract/introduction" cta="Read docs" arrow>
Interact with the smart contract for custom integrations.
Comment on lines +15 to +42
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Switch internal card links to relative paths.

These links are root-absolute (/...) instead of relative.

As per coding guidelines, "Use relative paths for all internal links in MDX documentation files."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@index.mdx` around lines 17 - 39, The Card components use root-absolute hrefs
(e.g., href="/integration/...") which violate the guideline to use relative
paths; update each Card's href prop to a relative path (remove the leading
slash) for internal links in this MDX file—locate the Card elements (e.g., the
Card instances titled "API Quickstart", "React Widget", "SDK Libraries", "What
are intents?", "Market Makers", "Verifier Contract") and change their href
attributes from "/..." to "./integration/..." or the correct relative path from
the current document location.

</Card>

tokens, _, err := apiClient.OneClickAPI.GetTokens(context.Background()).Execute()
if err != nil {
panic(err)
}
```
</Columns>

```rust Rust
use one_click_sdk_rs::apis::one_click_api;
use one_click_sdk_rs::apis::configuration::Configuration;

let config = Configuration::default();
let tokens = one_click_api::get_tokens(&config).await?;
println!("{}", tokens.len());
```
</CodeGroup>
</Columns>

<h2 class="ps-0"> Browse By Topic </h2>

<CardGroup cols="3">
<Card title="API Quickstart" icon="rocket" href="/integration/distribution-channels/1click-api/quickstart" cta="Integrate" arrow>
Execute your first cross-chain swap in minutes.
</Card>

<Card title="React Widget" icon="palette" href="/integration/devkit/react-widget" cta="Integrate" arrow>
Embed a customizable swap UI with a ready-to-use React component.
</Card>

<Card title="Swap Libraries" icon="window-restore" href="/integration/distribution-channels/1click-api/sdk" cta="Explore" arrow>
Build with TypeScript, Go, and Rust SDKs for typed API integration.
</Card>
<Card title="What are intents?" icon="lightbulb" href="/getting-started/what-are-intents" cta="Read docs" arrow>
Learn how the protocol works and core concepts.
</Card>

<Card title="Market Makers" icon="users" href="/integration/market-makers/introduction" cta="Learn how" arrow>
Provide liquidity by fulfilling cross-chain swap intents.
</Card>

<Card title="Verifier Contract" icon="credit-card" href="/integration/verifier-contract/introduction" cta="Read docs" arrow>
Interact with the smart contract for custom integrations.
</Card>

</CardGroup>

</div>

</div>
</div>
Loading