diff --git a/docs.json b/docs.json index ddf5f5b..24744c5 100644 --- a/docs.json +++ b/docs.json @@ -1,6 +1,6 @@ { "$schema": "https://mintlify.com/docs.json", - "theme": "maple", + "theme": "mint", "name": "NEAR Intents", "colors": { "primary": "#fb4d01", @@ -11,9 +11,9 @@ "navigation": { "tabs": [ { - "tab": "Swaps", + "tab": "Overview", "groups": [ - { + { "group": "Welcome", "hidden": true, "pages": [ @@ -21,52 +21,12 @@ ] }, { - "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": [ @@ -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" + ] + }, + { + "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", @@ -112,7 +120,7 @@ "tab": "Bridges", "groups": [ { - "group": "Bridges", + "group": " ", "pages": [ "integration/bridging/overview", "integration/market-makers/deposit-withdrawal-service" @@ -124,7 +132,7 @@ "tab": "Verifier Contract", "groups": [ { - "group": "Verifier Contract", + "group": " ", "pages": [ "integration/verifier-contract/introduction", "integration/verifier-contract/account-abstraction" @@ -160,7 +168,7 @@ "navbar": { "links": [ { - "label": "System Status", + "label": "Status", "href": "https://status.near-intents.org/posts/dashboard" }, { @@ -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", diff --git a/index.mdx b/index.mdx index e226dea..d9b8ed6 100644 --- a/index.mdx +++ b/index.mdx @@ -1,173 +1,51 @@ --- -hidden: true -mode: "wide" +mode: "custom" --- +
+
-

NEAR Intents

-

Welcome to the NEAR Intents Docs

+

+ NEAR Intents Documentation +

-
- -
-

1-Click Swap API

-

Request quotes, execute cross-chain swaps, and track their status.

-

Quickstart ->

-

Learn More ->

-
- - ```bash cURL - # Query supported tokens - curl https://1click.chaindefuser.com/v0/tokens +
- # 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", - ... - }' - ``` + + + Execute your first cross-chain swap in minutes. + - ```typescript TypeScript - // Query supported tokens - const tokensResponse = await fetch('https://1click.chaindefuser.com/v0/tokens'); - const tokens = await tokensResponse.json(); + + Embed a customizable swap UI with a ready-to-use React component. + - // 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(); - ``` + + Build with TypeScript, Go, and Rust SDKs for typed API integration. + - ```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() - ``` - - - -
+ + Learn how the protocol works and core concepts. + +

AI Agent Skills: `npx skills add near/agent-skills --skill near-intents`

-
- - - Swap Widget UI -
-

React Widget

-

Integrate a customizable, cross-chain swap interface into your app with just a few lines of code.

-

Learn More ->

-
- -
- - -
-

SDK Libraries

-

Use SDKs for TypeScript, Go, and Rust to request quotes, submit deposits, and monitor execution status.

-

Learn More ->

-
- - ```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); - ``` + + + Provide liquidity by fulfilling cross-chain swap intents. + - ```go Go - configuration := openapiclient.NewConfiguration() - apiClient := openapiclient.NewAPIClient(configuration) + + Interact with the smart contract for custom integrations. + - tokens, _, err := apiClient.OneClickAPI.GetTokens(context.Background()).Execute() - if err != nil { - panic(err) - } - ``` + - ```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()); - ``` - -
- -

Browse By Topic

- - - - Execute your first cross-chain swap in minutes. - - - - Embed a customizable swap UI with a ready-to-use React component. - - - - Build with TypeScript, Go, and Rust SDKs for typed API integration. - - - Learn how the protocol works and core concepts. - - - - Provide liquidity by fulfilling cross-chain swap intents. - - - - Interact with the smart contract for custom integrations. - - - +
+
\ No newline at end of file diff --git a/style.css b/style.css index 3ee6e6e..3b99875 100644 --- a/style.css +++ b/style.css @@ -3,6 +3,29 @@ overflow: auto; } +.landing-page { + min-height: calc(100vh - 7rem); + min-height: calc(100dvh - 7rem); + display: flex; + align-items: center; +} + +body:has(.landing) .nav-tabs-item[href="/getting-started/what-are-intents"] { + color: rgb(75 85 99) !important; + /* text-gray-600 */ + text-shadow: none !important; +} + +.dark body:has(.landing) .nav-tabs-item[href="/getting-started/what-are-intents"], +body.dark:has(.landing) .nav-tabs-item[href="/getting-started/what-are-intents"] { + color: rgb(156 163 175) !important; + /* dark:text-gray-400 */ +} + +body:has(.landing) .nav-tabs-item[href="/getting-started/what-are-intents"]>div { + background: transparent !important; +} + .primary { color: rgb(var(--primary)); }