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
13 changes: 9 additions & 4 deletions next-sitemap.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@ module.exports = {
// siteUrl to each route path (route paths do NOT include basePath), so the
// '/protocol/docs' segment lives on siteUrl here.
siteUrl:
process.env.NEXT_PUBLIC_VERCEL_ENV === 'production' ?
'https://splits.org/protocol/docs' :
`https://${process.env.NEXT_PUBLIC_VERCEL_URL}/protocol/docs`,
generateRobotsTxt: true,
process.env.NEXT_PUBLIC_VERCEL_ENV === 'production'
? 'https://splits.org/protocol/docs'
: `https://${process.env.NEXT_PUBLIC_VERCEL_URL}/protocol/docs`,
// Crawlers only read robots.txt at the host root, so one under basePath is
// inert; splits.org's own sitemap index already lists this sitemap.
generateRobotsTxt: false,
// The default lastmod is the build timestamp, which Google ignores as not
// verifiably accurate. Omit it rather than lie.
autoLastmod: false,
generateIndexSitemap: false,
// splits.org enforces trailing slashes (slash-less URLs 308 to the slashed
// form), so list the final URLs directly.
Expand Down
12 changes: 7 additions & 5 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,26 @@ module.exports = withNextra({
source: '/(.*)',
headers: [
// Prevents the page from being loaded in an iframe (clickjacking prevention)
{ key: 'Content-Security-Policy', value: `frame-ancestors 'none';`}
{ key: 'Content-Security-Policy', value: `frame-ancestors 'none';` },
],
},
]
},
async redirects() {
return [
// Trailing slash on the destination avoids a second hop through the
// splits.org 308.
{
source: '/sdk-info',
destination: '/sdk',
permanent: false,
destination: '/sdk/',
permanent: true,
},
// Just redirect any slug to the main page for now, not sure if they map
// the same
{
source: '/sdk-info/:slug*',
destination: '/sdk',
permanent: false,
destination: '/sdk/',
permanent: true,
},
]
},
Expand Down
14 changes: 14 additions & 0 deletions pages/_document.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React from 'react'
import { Head, Html, Main, NextScript } from 'next/document'

export default function Document() {
return (
<Html lang="en">
<Head />
<body>
<Main />
<NextScript />
</body>
</Html>
)
}
4 changes: 4 additions & 0 deletions pages/core.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Architecture of the Splits core contracts and how funds flow between the Warehouse, Split, Waterfall, Swapper and Vesting building blocks."
---

# Core contracts

This section describes the various smart contract building blocks upon which all
Expand Down
4 changes: 4 additions & 0 deletions pages/core/oracle.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "The price oracle contracts used by Swapper to value token conversions, including the Uniswap v3 TWAP oracle."
---

import { Toggle } from '../../components/toggle'
import { Tab, Tabs } from 'nextra-theme-docs'

Expand Down
4 changes: 4 additions & 0 deletions pages/core/pass-through.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "The Pass-Through Wallet contract forwards funds through an intermediary address whose owner can pause or retarget it."
---

import { Toggle } from '../../components/toggle'
import { Tab, Tabs } from 'nextra-theme-docs'

Expand Down
4 changes: 4 additions & 0 deletions pages/core/split-v2.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "SplitV2, the latest Splits contract: push and pull variants, deterministic deployment and how distributions and withdrawals work."
---

import { Toggle } from '../../components/toggle'
import { Callout, Tab, Tabs } from 'nextra-theme-docs'

Expand Down
4 changes: 4 additions & 0 deletions pages/core/split.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "The original Split contract deployed through SplitMain: how V1 splits receive, distribute and withdraw funds."
---

import { Toggle } from '../../components/toggle'
import { Callout, Tab, Tabs } from 'nextra-theme-docs'

Expand Down
4 changes: 4 additions & 0 deletions pages/core/swapper.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "The Swapper contract converts incoming tokens to a target token on distribution using oracle-based pricing."
---

import { Toggle } from '../../components/toggle'
import { Callout, Tab, Tabs } from 'nextra-theme-docs'

Expand Down
4 changes: 4 additions & 0 deletions pages/core/vesting.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "The Vesting contract releases funds to recipients linearly over a shared vesting period."
---

import { Toggle } from '../../components/toggle'
import { Tab, Tabs } from 'nextra-theme-docs'

Expand Down
4 changes: 4 additions & 0 deletions pages/core/warehouse.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "SplitWarehouse, the central balance storage contract that holds tokens for Splits protocol recipients until withdrawal."
---

import { Toggle } from '../../components/toggle'
import { Tab, Tabs } from 'nextra-theme-docs'

Expand Down
4 changes: 4 additions & 0 deletions pages/core/waterfall.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "The Waterfall contract pays recipients in sequential tranches, filling each threshold before funds flow to the next."
---

import { Toggle } from '../../components/toggle'
import { Tab, Tabs } from 'nextra-theme-docs'

Expand Down
4 changes: 4 additions & 0 deletions pages/flow.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "How funds move through the Splits protocol: receiving payments, distributing balances to recipients and withdrawing from the warehouse."
---

import { Toggle } from '../components/toggle'

# Flow of funds
Expand Down
4 changes: 4 additions & 0 deletions pages/index.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Documentation for the Splits protocol: open-source, audited Split, Waterfall and Swapper contracts for onchain revenue, plus a TypeScript SDK and React hooks."
---

# Docs

<div className="text-xl text-gray-500">
Expand Down
4 changes: 4 additions & 0 deletions pages/react.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "React hooks for the Splits protocol from @0xsplits/splits-sdk-react: read and write splits, waterfalls, swappers and vesting from React apps."
---

import { Tab, Tabs } from 'nextra-theme-docs'

# React SDK
Expand Down
4 changes: 4 additions & 0 deletions pages/sdk.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Install and configure @0xsplits/splits-sdk, the TypeScript SDK for creating and managing splits, waterfalls, swappers and vesting contracts."
---

import { Callout, Tab, Tabs } from 'nextra-theme-docs'

# Splits Development Kit
Expand Down
4 changes: 4 additions & 0 deletions pages/sdk/data.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Query split metadata, balances and activity through the Splits GraphQL API with the DataClient in the Splits TypeScript SDK."
---

# Splits Data Client

The Splits Data client offers a comprehensive suite of functionalities for
Expand Down
4 changes: 4 additions & 0 deletions pages/sdk/liquid.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Create and manage NFT-governed liquid splits with the LiquidSplitClient in the Splits TypeScript SDK."
---

# Liquid Splits

Begin by importing `LiquidSplitClient` into your app. If you are using the
Expand Down
4 changes: 4 additions & 0 deletions pages/sdk/multicall.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Batch multiple Splits SDK calls into a single multicall transaction."
---

# Multicall

Batch transactions together into a single multicall transaction. This multicall function can be accessed
Expand Down
4 changes: 4 additions & 0 deletions pages/sdk/splits-v1.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Manage legacy V1 splits with the SplitsClient in the Splits TypeScript SDK."
---

# Splits V1

Begin by importing `SplitsClient` into your app.
Expand Down
4 changes: 4 additions & 0 deletions pages/sdk/splits-v2.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Create, update, distribute and withdraw from V2 splits with the SplitV2Client in the Splits TypeScript SDK."
---

# Splits V2

Begin by importing `SplitV2Client` into your app.
Expand Down
4 changes: 4 additions & 0 deletions pages/sdk/swapper.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Create and manage swappers that convert incoming tokens on distribution with the SwapperClient in the Splits TypeScript SDK."
---

# Swapper

Begin by importing `SwapperClient` into your app. If you are using the
Expand Down
4 changes: 4 additions & 0 deletions pages/sdk/templates.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Deploy recoup, diversifier and other composed payment flows with the TemplatesClient in the Splits TypeScript SDK."
---

# Templates

Begin by importing `TemplatesClient` into your app. If you are using the
Expand Down
4 changes: 4 additions & 0 deletions pages/sdk/utils.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Helper functions and constants exposed by the Splits TypeScript SDK for formatting, validation and calculations."
---

# Utilities

The SDK exposes some of the utility functions and constants to make development with it easier.
Expand Down
4 changes: 4 additions & 0 deletions pages/sdk/vesting.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Create and manage time-locked vesting streams with the VestingClient in the Splits TypeScript SDK."
---

# Vesting

Begin by importing `VestingClient` into your app. If you are using the
Expand Down
4 changes: 4 additions & 0 deletions pages/sdk/warehouse.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Read and withdraw balances held in the SplitWarehouse contract with the WarehouseClient in the Splits TypeScript SDK."
---

# Warehouse

Begin by importing `WarehouseClient` into your app.
Expand Down
4 changes: 4 additions & 0 deletions pages/sdk/waterfall.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Create and manage waterfall payment flows with the WaterfallClient in the Splits TypeScript SDK."
---

# Waterfall

Begin by importing `WaterfallClient` into your app. If you are using the
Expand Down
4 changes: 4 additions & 0 deletions pages/splits-kit.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "SplitsKit, the pre-built React component library for displaying and creating splits, with Storybook examples."
---

import { Tab, Tabs, Callout } from 'nextra-theme-docs'

# SplitsKit
Expand Down
4 changes: 4 additions & 0 deletions pages/templates.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "Composed payment flows such as Recoup, Liquid Split and Diversifier, built by combining Splits core contracts."
---

# Templates

This section describes more complicated payment flows that are built by composing multiple building blocks.
4 changes: 4 additions & 0 deletions pages/templates/diversifier.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "The Diversifier template automatically swaps and splits incoming tokens across a diversified set of assets."
---

import { Toggle } from '../../components/toggle'
import { Tab, Tabs } from 'nextra-theme-docs'

Expand Down
4 changes: 4 additions & 0 deletions pages/templates/liquid.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "The Liquid Split template is a mutable split whose recipients are governed by NFT ownership."
---

import { Toggle } from '../../components/toggle'
import { Tab, Tabs } from 'nextra-theme-docs'
import { Callout } from 'nextra-theme-docs'
Expand Down
4 changes: 4 additions & 0 deletions pages/templates/recoup.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
description: "The Recoup template repays an initial investment through a waterfall before splitting remaining funds among recipients."
---

import { Toggle } from '../../components/toggle'
import { Tab, Tabs } from 'nextra-theme-docs'

Expand Down
Loading