From fa479a039fdbf50af2159759d051d0007e509397 Mon Sep 17 00:00:00 2001 From: haochizzle Date: Mon, 29 Jul 2024 21:51:56 +0800 Subject: [PATCH 01/36] prelim updates to landing page copy, sidebar links, navigation links, etc. --- docs/docusaurus.config.ts | 46 ++++++++++++------- .../src/components/HomepageFeatures/index.tsx | 15 +++--- docs/src/css/custom.css | 4 ++ 3 files changed, 39 insertions(+), 26 deletions(-) diff --git a/docs/docusaurus.config.ts b/docs/docusaurus.config.ts index 2175f3a..8693d91 100644 --- a/docs/docusaurus.config.ts +++ b/docs/docusaurus.config.ts @@ -3,8 +3,8 @@ import type {Config} from '@docusaurus/types'; import type * as Preset from '@docusaurus/preset-classic'; const config: Config = { - title: 'Sprinter Docs', - tagline: 'Sprinter is soo cool', + title: 'Sprinter', + tagline: 'Do Not Walk, Sprint.', favicon: 'img/favicon.ico', // Set the production url of your site here @@ -55,16 +55,16 @@ const config: Config = { src: 'img/logo.svg', }, items: [ - { - type: 'docSidebar', - sidebarId: 'tutorialSidebar', - position: 'left', - label: 'Docs', - }, + // { + // type: 'docSidebar', + // sidebarId: 'tutorialSidebar', + // position: 'left', + // label: 'Docs', + // } { href: 'https://poc.sprinter.buildwithsygma.com/', label: 'POC', - position: 'right', + position: 'left', }, { href: 'https://github.com/ChainSafe/sprinter-ts', @@ -83,31 +83,43 @@ const config: Config = { label: 'Introduction', to: '/docs/introduction', }, + { + label: 'SDK', + to: '/docs/category/sdk', + }, + { + label: 'API', + to: '/docs/category/api', + }, ], }, { title: 'Community', items: [ { - label: 'Stack Overflow', - href: 'https://stackoverflow.com/questions/tagged/docusaurus', + label: 'Twitter', + href: 'https://twitter.com/sprinter_ux', }, { label: 'Discord', - href: 'https://discordapp.com/invite/docusaurus', - }, - { - label: 'Twitter', - href: 'https://twitter.com/docusaurus', + href: 'https://discord.gg/DjpAhQvbkw', }, ], }, { title: 'More', items: [ + { + label: 'Website', + href: 'https://sprinter.box', + }, { label: 'GitHub', - href: 'https://github.com/facebook/docusaurus', + href: 'https://github.com/ChainSafe/sprinter-ts', + }, + { + label: 'Blog', + href: 'https://blog.chainsafe.io', }, ], }, diff --git a/docs/src/components/HomepageFeatures/index.tsx b/docs/src/components/HomepageFeatures/index.tsx index 50a9e6f..e567461 100644 --- a/docs/src/components/HomepageFeatures/index.tsx +++ b/docs/src/components/HomepageFeatures/index.tsx @@ -10,32 +10,29 @@ type FeatureItem = { const FeatureList: FeatureItem[] = [ { - title: 'Easy to Use', + title: 'Unified Balance', Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default, description: ( <> - Docusaurus was designed from the ground up to be easily installed and - used to get your website up and running quickly. + Single token balance displayed across multiple chains. ), }, { - title: 'Focus on What Matters', + title: 'Optimized execution', Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default, description: ( <> - Docusaurus lets you focus on your docs, and we'll do the chores. Go - ahead and move your docs into the docs directory. + Automatically determines the fastest and cheapest execution paths for a transfer, regardless of layer. ), }, { - title: 'Powered by React', + title: 'UX Boon', Svg: require('@site/static/img/undraw_docusaurus_react.svg').default, description: ( <> - Extend or customize your website layout by reusing React. Docusaurus can - be extended while reusing the same header and footer. + One signature to nuke network switching once and for all. ), }, diff --git a/docs/src/css/custom.css b/docs/src/css/custom.css index 2bc6a4c..4488118 100644 --- a/docs/src/css/custom.css +++ b/docs/src/css/custom.css @@ -5,6 +5,10 @@ */ /* You can override the default Infima variables here. */ +.navbar__title { + font-size: 2em; /* Adjust the size as needed */ +} + :root { --ifm-color-primary: #2e8555; --ifm-color-primary-dark: #29784c; From 79baffe11d0fe88be0a7a67db6a7d711bb46dbee Mon Sep 17 00:00:00 2001 From: haochizzle Date: Mon, 29 Jul 2024 22:06:13 +0800 Subject: [PATCH 02/36] update feature icons (these arent final) --- docs/src/components/HomepageFeatures/index.tsx | 6 +++--- docs/static/img/balance.svg | 9 +++++++++ docs/static/img/execution.svg | 6 ++++++ docs/static/img/ux.svg | 6 ++++++ 4 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 docs/static/img/balance.svg create mode 100644 docs/static/img/execution.svg create mode 100644 docs/static/img/ux.svg diff --git a/docs/src/components/HomepageFeatures/index.tsx b/docs/src/components/HomepageFeatures/index.tsx index e567461..e13a836 100644 --- a/docs/src/components/HomepageFeatures/index.tsx +++ b/docs/src/components/HomepageFeatures/index.tsx @@ -11,7 +11,7 @@ type FeatureItem = { const FeatureList: FeatureItem[] = [ { title: 'Unified Balance', - Svg: require('@site/static/img/undraw_docusaurus_mountain.svg').default, + Svg: require('@site/static/img/balance.svg').default, description: ( <> Single token balance displayed across multiple chains. @@ -20,7 +20,7 @@ const FeatureList: FeatureItem[] = [ }, { title: 'Optimized execution', - Svg: require('@site/static/img/undraw_docusaurus_tree.svg').default, + Svg: require('@site/static/img/execution.svg').default, description: ( <> Automatically determines the fastest and cheapest execution paths for a transfer, regardless of layer. @@ -29,7 +29,7 @@ const FeatureList: FeatureItem[] = [ }, { title: 'UX Boon', - Svg: require('@site/static/img/undraw_docusaurus_react.svg').default, + Svg: require('@site/static/img/ux.svg').default, description: ( <> One signature to nuke network switching once and for all. diff --git a/docs/static/img/balance.svg b/docs/static/img/balance.svg new file mode 100644 index 0000000..58c1dba --- /dev/null +++ b/docs/static/img/balance.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/docs/static/img/execution.svg b/docs/static/img/execution.svg new file mode 100644 index 0000000..020879c --- /dev/null +++ b/docs/static/img/execution.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/docs/static/img/ux.svg b/docs/static/img/ux.svg new file mode 100644 index 0000000..e712460 --- /dev/null +++ b/docs/static/img/ux.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file From 98f6c7f0703de5d8c286ad663015d4d06a2e5bc5 Mon Sep 17 00:00:00 2001 From: haochizzle Date: Wed, 31 Jul 2024 17:59:16 +0800 Subject: [PATCH 03/36] update landing page with contact us section + small visual updates --- docs/docusaurus.config.ts | 22 +++++-- .../src/components/HomepageFeatures/index.tsx | 6 +- docs/src/pages/index.module.css | 61 +++++++++++++++++-- docs/src/pages/index.tsx | 40 ++++++++++-- docs/static/img/intersect.svg | 5 ++ docs/static/img/run.svg | 7 +++ 6 files changed, 122 insertions(+), 19 deletions(-) create mode 100644 docs/static/img/intersect.svg create mode 100644 docs/static/img/run.svg diff --git a/docs/docusaurus.config.ts b/docs/docusaurus.config.ts index 8693d91..29b81df 100644 --- a/docs/docusaurus.config.ts +++ b/docs/docusaurus.config.ts @@ -4,8 +4,8 @@ import type * as Preset from '@docusaurus/preset-classic'; const config: Config = { title: 'Sprinter', - tagline: 'Do Not Walk, Sprint.', - favicon: 'img/favicon.ico', + tagline: 'Multichain interactions that feel like one', + favicon: 'img/run.ico', // Set the production url of your site here url: 'https://docs.sprinter.buildwithsygma.com/', @@ -51,8 +51,8 @@ const config: Config = { navbar: { title: 'Sprinter', logo: { - alt: 'My Site Logo', - src: 'img/logo.svg', + alt: 'Sprinter Temp Logo', + src: 'img/run.svg', }, items: [ // { @@ -66,6 +66,16 @@ const config: Config = { label: 'POC', position: 'left', }, + { + to: 'docs/get-started', + position: 'left', + label: 'Learn', + }, + { + to: 'docs/api/get-started', + position: 'left', + label: 'API', + }, { href: 'https://github.com/ChainSafe/sprinter-ts', label: 'GitHub', @@ -102,7 +112,7 @@ const config: Config = { }, { label: 'Discord', - href: 'https://discord.gg/DjpAhQvbkw', + href: 'https://discord.gg/Qdf6GyNB5J', }, ], }, @@ -119,7 +129,7 @@ const config: Config = { }, { label: 'Blog', - href: 'https://blog.chainsafe.io', + href: 'https://blog.buildwithsygma.com', }, ], }, diff --git a/docs/src/components/HomepageFeatures/index.tsx b/docs/src/components/HomepageFeatures/index.tsx index e13a836..fef6192 100644 --- a/docs/src/components/HomepageFeatures/index.tsx +++ b/docs/src/components/HomepageFeatures/index.tsx @@ -14,12 +14,12 @@ const FeatureList: FeatureItem[] = [ Svg: require('@site/static/img/balance.svg').default, description: ( <> - Single token balance displayed across multiple chains. + Single token balance representing one asset across multiple chains. ), }, { - title: 'Optimized execution', + title: 'Optimized Execution', Svg: require('@site/static/img/execution.svg').default, description: ( <> @@ -28,7 +28,7 @@ const FeatureList: FeatureItem[] = [ ), }, { - title: 'UX Boon', + title: 'UX Buff', Svg: require('@site/static/img/ux.svg').default, description: ( <> diff --git a/docs/src/pages/index.module.css b/docs/src/pages/index.module.css index 9f71a5d..410fd5c 100644 --- a/docs/src/pages/index.module.css +++ b/docs/src/pages/index.module.css @@ -3,21 +3,74 @@ * and scoped locally. */ +@media screen and (max-width: 996px) { + .heroBanner { + padding: 2rem; + } +} + .heroBanner { + background-color: #282c34; padding: 4rem 0; text-align: center; position: relative; overflow: hidden; } -@media screen and (max-width: 996px) { - .heroBanner { - padding: 2rem; - } +.heroTitle { + font-size: 4rem; + font-weight: bold; +} + +.heroSubtitle { + font-size: 1.5rem; + margin-bottom: 2rem; + font-size: 2rem; + font-weight: bold; +} + +.highlight { + color: #61dafb; /* Change to your desired highlight color */ } .buttons { + margin-top: 1rem; display: flex; align-items: center; justify-content: center; } + +.callToActionSection { + padding: 4rem 0; + background-color: #f9f9f9; +} + +.callToActionSection h2 { + font-size: 2.5rem; + margin-bottom: 1rem; +} + +.callToActionSection p { + font-size: 1.25rem; + margin-bottom: 1.5rem; +} + +.callToActionSection img.ctaImage { + display: block; + margin: 0 auto; /* Center the image horizontally */ + max-width: 100%; /* Make sure the image doesn't overflow its container */ + height: auto; /* Maintain the aspect ratio */ + width: 200px; /* Set a specific width or max-width as needed */ +} + +.svg-container { + display: flex; + justify-content: center; + align-items: center; + height: 100vh; /* Adjust this as needed */ +} + +.icon { + width: 150px; /* Adjust this as needed */ + height: 150px; /* Adjust this as needed */ +} diff --git a/docs/src/pages/index.tsx b/docs/src/pages/index.tsx index 2f8a06c..3b8e714 100644 --- a/docs/src/pages/index.tsx +++ b/docs/src/pages/index.tsx @@ -8,19 +8,21 @@ import Heading from '@theme/Heading'; import styles from './index.module.css'; function HomepageHeader() { - const {siteConfig} = useDocusaurusContext(); + const { siteConfig } = useDocusaurusContext(); return (
- + {siteConfig.title} -

{siteConfig.tagline}

+

+ Multichain interactions that feel like one +

- Documentation + Get Started

@@ -28,7 +30,7 @@ function HomepageHeader() { - Proof of Concept + Try the Proof of Concept
@@ -36,8 +38,33 @@ function HomepageHeader() { ); } +function CallToActionSection() { + return ( +
+
+
+
+

+ Sprint Into Action +

+

Evolve your application's UX. Reach out to the Sprinter team to integrate today.

+ + Contact Us + +
+
+ ContactUs +
+
+
+
+ ); +} + export default function Home(): JSX.Element { - const {siteConfig} = useDocusaurusContext(); + const { siteConfig } = useDocusaurusContext(); return (
+
); diff --git a/docs/static/img/intersect.svg b/docs/static/img/intersect.svg new file mode 100644 index 0000000..d5ea3b2 --- /dev/null +++ b/docs/static/img/intersect.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/docs/static/img/run.svg b/docs/static/img/run.svg new file mode 100644 index 0000000..3084ae7 --- /dev/null +++ b/docs/static/img/run.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file From a3e4e658b84f763914a16a742365e1b63e61b742 Mon Sep 17 00:00:00 2001 From: haochizzle Date: Thu, 1 Aug 2024 21:45:26 +0800 Subject: [PATCH 04/36] number the docs for viewability --- docs/docs/01-introduction.md | 21 +++++++ .../{get-started.md => 02-get-started.md} | 51 ++++++++++++++- .../overview.md => 03-sdk/01-overview.md} | 9 +-- .../02-advanced-usage.md} | 6 -- .../03-class-reference.md} | 6 -- .../04-api-functions.md} | 5 -- docs/docs/{sdk => 03-sdk}/_category_.json | 2 +- .../get-started.md => 04-api/01-api-usage.md} | 10 ++- .../networks.md => 04-api/02-networks.md} | 0 .../{api/assets.md => 04-api/03-assets.md} | 0 .../04-user-assets.md} | 0 .../solutions.md => 04-api/05-solutions.md} | 0 docs/docs/{api => 04-api}/_category_.json | 2 +- docs/docs/introduction.md | 62 ------------------- docs/docusaurus.config.ts | 10 +-- docs/src/pages/index.tsx | 4 +- 16 files changed, 83 insertions(+), 105 deletions(-) create mode 100644 docs/docs/01-introduction.md rename docs/docs/{get-started.md => 02-get-started.md} (57%) rename docs/docs/{sdk/overview.md => 03-sdk/01-overview.md} (84%) rename docs/docs/{sdk/advanced-usage.md => 03-sdk/02-advanced-usage.md} (90%) rename docs/docs/{sdk/class-reference.md => 03-sdk/03-class-reference.md} (95%) rename docs/docs/{sdk/api-functions.md => 03-sdk/04-api-functions.md} (95%) rename docs/docs/{sdk => 03-sdk}/_category_.json (51%) rename docs/docs/{api/get-started.md => 04-api/01-api-usage.md} (89%) rename docs/docs/{api/networks.md => 04-api/02-networks.md} (100%) rename docs/docs/{api/assets.md => 04-api/03-assets.md} (100%) rename docs/docs/{api/user-assets.md => 04-api/04-user-assets.md} (100%) rename docs/docs/{api/solutions.md => 04-api/05-solutions.md} (100%) rename docs/docs/{api => 04-api}/_category_.json (51%) delete mode 100644 docs/docs/introduction.md diff --git a/docs/docs/01-introduction.md b/docs/docs/01-introduction.md new file mode 100644 index 0000000..699b667 --- /dev/null +++ b/docs/docs/01-introduction.md @@ -0,0 +1,21 @@ +--- +id: intro +title: What Is Sprinter? +sidebar_position: 1 +--- + +# Welcome To The Sprinter Docs + +Sprinter is a fast, smooth, interoperable intent execution engine. It is designed to simplify cross-chain balance aggregation and transaction management, making multichain interactions feel like one. Sprinter greatly enhances cross-chain UX for users, applications, and wallets, and does so as a first-class citizen for all web3 tech. Additionally, Sprinter solves horizontal scalabiltiy for both sides of the blockchains being bridged. + +## What's Next + +- If you're new to Sprinter, start with our [Getting Started Guide](02-get-started.md). +- Explore detailed examples and advanced usage in the [SDK Documentation](03-sdk/01-overview.md). +- Dive into the specifics of our API in the [API Documentation](04-api/01-api-usage.md). + +Stay tuned for the complete source code. + +## Need Assistance? + +If you have questions about Sprinter, the code, the docs, or have a business inquiry, please reach out to us on [Discord](https://discord.gg/Qdf6GyNB5J) or via email at [requests@buildwithsygma.com](mailto:requests@buildwithsygma.com). diff --git a/docs/docs/get-started.md b/docs/docs/02-get-started.md similarity index 57% rename from docs/docs/get-started.md rename to docs/docs/02-get-started.md index d432dbc..5be6c47 100644 --- a/docs/docs/get-started.md +++ b/docs/docs/02-get-started.md @@ -1,7 +1,53 @@ --- +id: gettingstarted +title: Getting Started sidebar_position: 2 --- +Depending on your needs, you have two main options for using the Sprinter SDK: + +1. **Using the SDK (Recommended for TypeScript and Web Framework Developers)** +2. **Calling APIs Directly** + +### Using the SDK + +Using the Sprinter SDK provides a convenient and unified interface for blockchain interactions, complete with TypeScript support for enhanced type safety and a better development experience. This approach is particularly recommended for developers working with TypeScript or popular web frameworks. + +#### Quick Example + +Here's a quick example of how to use the SDK in your project: + +```typescript +import { Sprinter } from '@chainsafe/sprinter-sdk'; + +const sprinter = new Sprinter(window.ethereum); + +sprinter.getUserBalances().then(console.log); +``` + +For a more detailed guide on setting up and using the SDK, refer to the [SDK Documentation](03-sdk/01-overview.md). + +### Calling API Endpoints Directly + +If you prefer more control or wish to implement the solution in a different programming language, you can directly interact with the API endpoints provided by Sprinter. + +#### Quick Example + +Here’s how you can call the API directly using JavaScript's Fetch API: + +```javascript +const ownerAddress = "0x3E101Ec02e7A48D16DADE204C96bFF842E7E2519"; +const tokenSymbol = "USDC"; +const baseUrl = "https://your-api-url.com"; // Replace with your API base URL + +fetch(`${baseUrl}/accounts/${ownerAddress}/assets/fungible/${tokenSymbol}`) + .then(response => response.json()) + .then(data => console.log(data)) + .catch(error => console.error('Error fetching user fungible tokens:', error)); +``` + +For a comprehensive list of available endpoints and how to use them, check out the [API Documentation](04-api/01-api-usage.md). + # Getting Started Welcome to the Sprinter SDK! This guide will introduce you to the application flow of Sprinter, explaining how it integrates with your application to manage cross-chain balances and transactions. @@ -64,8 +110,7 @@ Below is a simplified diagram illustrating the Sprinter application flow: Now that you understand the Sprinter application flow, here are some next steps to dive deeper into specific areas: -- **[SDK Documentation](sdk/overview.md)**: Learn how to set up and use the SDK in your application. -- **[API Documentation](api/user-assets.md)**: Explore the API endpoints provided by Sprinter for direct integration. -- **[Introduction to Sprinter SDK](introduction.md)**: Get an overview of the Sprinter SDK and its key features. +- **[SDK Documentation](03-sdk/01-overview.md)**: Learn how to set up and use the SDK in your application. +- **[API Documentation](04-api/04-user-assets.md)**: Explore the API endpoints provided by Sprinter for direct integration. We hope this guide provides a clear understanding of the Sprinter application flow. If you have any questions or need further assistance, feel free to reach out. Happy coding! diff --git a/docs/docs/sdk/overview.md b/docs/docs/03-sdk/01-overview.md similarity index 84% rename from docs/docs/sdk/overview.md rename to docs/docs/03-sdk/01-overview.md index 6c3c0ce..f08831f 100644 --- a/docs/docs/sdk/overview.md +++ b/docs/docs/03-sdk/01-overview.md @@ -92,11 +92,4 @@ sprinter.getUserBalances().then(balances => { }).catch(error => { console.error('An error occurred:', error); }); -``` - -## Next Steps - -- **[Core Concepts](../get-started.md)**: Understand the fundamental concepts and operations of the Sprinter SDK. -- **[Advanced Usage](advanced-usage.md)**: Explore advanced features and best practices. -- **[Class API Reference](class-reference.md)**: Get detailed information about the classes and methods provided by the SDK. -- **[API Reference](api-functions.md)**: Get detailed information about the classes and methods provided by the SDK. +``` \ No newline at end of file diff --git a/docs/docs/sdk/advanced-usage.md b/docs/docs/03-sdk/02-advanced-usage.md similarity index 90% rename from docs/docs/sdk/advanced-usage.md rename to docs/docs/03-sdk/02-advanced-usage.md index 33e530c..7294c6a 100644 --- a/docs/docs/sdk/advanced-usage.md +++ b/docs/docs/03-sdk/02-advanced-usage.md @@ -102,9 +102,3 @@ Follow these best practices to ensure smooth and efficient integration of the Sp - **User Experience**: Provide clear feedback to users about the status of their transactions and any errors that occur. - **Security**: Ensure that your application handles sensitive information securely and follows best practices for interacting with blockchain networks. - **Optimization**: Use the SDK’s features to optimize cross-chain transactions and minimize costs. - -## Next Steps - -- **[Class API Reference](class-reference.md)**: Get detailed information about the classes and methods provided by the SDK. -- **[API Reference](api-functions.md)**: Get detailed information about the classes and methods provided by the SDK. -- **[Getting Started](../get-started.md)**: Review the basic setup and core concepts. diff --git a/docs/docs/sdk/class-reference.md b/docs/docs/03-sdk/03-class-reference.md similarity index 95% rename from docs/docs/sdk/class-reference.md rename to docs/docs/03-sdk/03-class-reference.md index c67ede4..cef7aeb 100644 --- a/docs/docs/sdk/class-reference.md +++ b/docs/docs/03-sdk/03-class-reference.md @@ -218,9 +218,3 @@ Represents an amount in both native and USD values. - `amount: string`: The amount in the smallest unit (e.g., wei). - `amountUSD: number`: The equivalent amount in USD. - -## Next Steps - -- **[API Functions](api-functions.md)**: Get detailed information about the API functions provided by the SDK. -- **[Advanced Usage](advanced-usage.md)**: Explore advanced features and best practices. -- **[Getting Started](../get-started.md)**: Review the basic setup and core concepts. diff --git a/docs/docs/sdk/api-functions.md b/docs/docs/03-sdk/04-api-functions.md similarity index 95% rename from docs/docs/sdk/api-functions.md rename to docs/docs/03-sdk/04-api-functions.md index 856e53a..543603a 100644 --- a/docs/docs/sdk/api-functions.md +++ b/docs/docs/03-sdk/04-api-functions.md @@ -261,8 +261,3 @@ Represents an amount in both native and USD values. - `amount: string`: The amount in the smallest unit (e.g., wei). - `amountUSD: number`: The equivalent amount in USD. -## Next Steps - -- **[Sprinter Class](class-reference.md)**: Get detailed information about the Sprinter class provided by the SDK. -- **[Advanced Usage](advanced-usage.md)**: Explore advanced features and best practices. -- **[Getting Started](../get-started.md)**: Review the basic setup and core concepts. diff --git a/docs/docs/sdk/_category_.json b/docs/docs/03-sdk/_category_.json similarity index 51% rename from docs/docs/sdk/_category_.json rename to docs/docs/03-sdk/_category_.json index d821cc0..99bd86c 100644 --- a/docs/docs/sdk/_category_.json +++ b/docs/docs/03-sdk/_category_.json @@ -3,6 +3,6 @@ "position": 3, "link": { "type": "generated-index", - "description": "5 minutes to learn the most important Docusaurus concepts." + "description": "All about the Sprinter SDK." } } diff --git a/docs/docs/api/get-started.md b/docs/docs/04-api/01-api-usage.md similarity index 89% rename from docs/docs/api/get-started.md rename to docs/docs/04-api/01-api-usage.md index ac78282..a4ce8a9 100644 --- a/docs/docs/api/get-started.md +++ b/docs/docs/04-api/01-api-usage.md @@ -2,9 +2,7 @@ sidebar_position: 1 --- -# Get Started - -## API Usage +# API Usage If you prefer using API calls directly or due to limitations of your environment, you can use the Sprinter API. This guide provides an overview of the available endpoints and examples of how to interact with them. @@ -24,13 +22,13 @@ curl -X 'GET' \ For more detailed information about each endpoint, please refer to the specific documents: -- [Fungible Assets](assets.md) +- [Fungible Assets](03-assets.md) - Get all assets information - Get specific assets information - Get specific network assets -- [Networks](networks.md) +- [Networks](02-networks.md) - Get all supported networks -- [Solutions](solutions.md) +- [Solutions](05-solutions.md) - Token aggregation - Token aggregation with contract call diff --git a/docs/docs/api/networks.md b/docs/docs/04-api/02-networks.md similarity index 100% rename from docs/docs/api/networks.md rename to docs/docs/04-api/02-networks.md diff --git a/docs/docs/api/assets.md b/docs/docs/04-api/03-assets.md similarity index 100% rename from docs/docs/api/assets.md rename to docs/docs/04-api/03-assets.md diff --git a/docs/docs/api/user-assets.md b/docs/docs/04-api/04-user-assets.md similarity index 100% rename from docs/docs/api/user-assets.md rename to docs/docs/04-api/04-user-assets.md diff --git a/docs/docs/api/solutions.md b/docs/docs/04-api/05-solutions.md similarity index 100% rename from docs/docs/api/solutions.md rename to docs/docs/04-api/05-solutions.md diff --git a/docs/docs/api/_category_.json b/docs/docs/04-api/_category_.json similarity index 51% rename from docs/docs/api/_category_.json rename to docs/docs/04-api/_category_.json index e18e173..23bcc9b 100644 --- a/docs/docs/api/_category_.json +++ b/docs/docs/04-api/_category_.json @@ -3,6 +3,6 @@ "position": 4, "link": { "type": "generated-index", - "description": "5 minutes to learn the most important Docusaurus concepts." + "description": "All about the Sprinter API." } } diff --git a/docs/docs/introduction.md b/docs/docs/introduction.md deleted file mode 100644 index 6d98203..0000000 --- a/docs/docs/introduction.md +++ /dev/null @@ -1,62 +0,0 @@ ---- -sidebar_position: 1 ---- - -# Introduction - -Welcome to the Sprinter SDK documentation! The Sprinter SDK is a powerful tool designed to simplify cross-chain balance aggregation and transaction management, allowing your customers to seamlessly interact with multiple blockchain networks. - -## Getting Started - -Depending on your needs, you have two main options for using the Sprinter SDK: - -1. **Using the SDK (Recommended for TypeScript and Web Framework Developers)** -2. **Calling APIs Directly** - -### Using the SDK - -Using the Sprinter SDK provides a convenient and unified interface for blockchain interactions, complete with TypeScript support for enhanced type safety and a better development experience. This approach is particularly recommended for developers working with TypeScript or popular web frameworks. - -#### Quick Example - -Here's a quick example of how to use the SDK in your project: - -```typescript -import { Sprinter } from '@chainsafe/sprinter-sdk'; - -const sprinter = new Sprinter(window.ethereum); - -sprinter.getUserBalances().then(console.log); -``` - -For a more detailed guide on setting up and using the SDK, refer to the [SDK Documentation](sdk/overview.md). - -### Calling API Endpoints Directly - -If you prefer more control or wish to implement the solution in a different programming language, you can directly interact with the API endpoints provided by Sprinter. - -#### Quick Example - -Here’s how you can call the API directly using JavaScript's Fetch API: - -```javascript -const ownerAddress = "0x3E101Ec02e7A48D16DADE204C96bFF842E7E2519"; -const tokenSymbol = "USDC"; -const baseUrl = "https://your-api-url.com"; // Replace with your API base URL - -fetch(`${baseUrl}/accounts/${ownerAddress}/assets/fungible/${tokenSymbol}`) - .then(response => response.json()) - .then(data => console.log(data)) - .catch(error => console.error('Error fetching user fungible tokens:', error)); -``` - -For a comprehensive list of available endpoints and how to use them, check out the [API Documentation](api/get-started.md). - -## Next Steps - -- If you're new to Sprinter SDK, start with our [Getting Started Guide](get-started.md). -- For an in-depth understanding, read the [Introduction to Sprinter SDK](introduction.md). -- Explore detailed examples and advanced usage in the [SDK Documentation](sdk/overview.md). -- Dive into the specifics of our API in the [API Documentation](api/get-started.md). - -We hope you find the Sprinter SDK easy to use and integrate into your projects. Happy coding! diff --git a/docs/docusaurus.config.ts b/docs/docusaurus.config.ts index 29b81df..6a6f85a 100644 --- a/docs/docusaurus.config.ts +++ b/docs/docusaurus.config.ts @@ -38,7 +38,7 @@ const config: Config = { // Please change this to your repo. // Remove this to remove the "edit this page" links. editUrl: - 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/', + 'https://github.com/chainsafe/sprinter-ts', }, blog: false, } satisfies Preset.Options, @@ -47,7 +47,7 @@ const config: Config = { themeConfig: { // Replace with your project's social card - image: 'img/docusaurus-social-card.jpg', + // image: 'img/docusaurus-social-card.jpg', navbar: { title: 'Sprinter', logo: { @@ -67,12 +67,12 @@ const config: Config = { position: 'left', }, { - to: 'docs/get-started', + to: 'docs/gettingstarted', position: 'left', label: 'Learn', }, { - to: 'docs/api/get-started', + to: 'docs/api/api-usage', position: 'left', label: 'API', }, @@ -91,7 +91,7 @@ const config: Config = { items: [ { label: 'Introduction', - to: '/docs/introduction', + to: '/docs/intro', }, { label: 'SDK', diff --git a/docs/src/pages/index.tsx b/docs/src/pages/index.tsx index 3b8e714..2549713 100644 --- a/docs/src/pages/index.tsx +++ b/docs/src/pages/index.tsx @@ -21,7 +21,7 @@ function HomepageHeader() {
+ to="/docs/intro"> Get Started
@@ -45,7 +45,7 @@ function CallToActionSection() {

- Sprint Into Action + Sprint Into Action

Evolve your application's UX. Reach out to the Sprinter team to integrate today.

Date: Tue, 6 Aug 2024 23:25:40 +0800 Subject: [PATCH 05/36] remove redundant getting started mentions; add search bar; refactor structure for introduction folder; refactor gettingstarted to quickstart; random css tidbits --- docs/docs/01-introduction.md | 21 ----- docs/docs/01-introduction/01-introduction.md | 31 +++++++ docs/docs/01-introduction/01b-flow.md | 57 +++++++++++++ docs/docs/02-get-started.md | 85 +++----------------- docs/docusaurus.config.ts | 36 +++++++-- docs/package.json | 1 + docs/src/pages/index.tsx | 4 +- 7 files changed, 130 insertions(+), 105 deletions(-) delete mode 100644 docs/docs/01-introduction.md create mode 100644 docs/docs/01-introduction/01-introduction.md create mode 100644 docs/docs/01-introduction/01b-flow.md diff --git a/docs/docs/01-introduction.md b/docs/docs/01-introduction.md deleted file mode 100644 index 699b667..0000000 --- a/docs/docs/01-introduction.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -id: intro -title: What Is Sprinter? -sidebar_position: 1 ---- - -# Welcome To The Sprinter Docs - -Sprinter is a fast, smooth, interoperable intent execution engine. It is designed to simplify cross-chain balance aggregation and transaction management, making multichain interactions feel like one. Sprinter greatly enhances cross-chain UX for users, applications, and wallets, and does so as a first-class citizen for all web3 tech. Additionally, Sprinter solves horizontal scalabiltiy for both sides of the blockchains being bridged. - -## What's Next - -- If you're new to Sprinter, start with our [Getting Started Guide](02-get-started.md). -- Explore detailed examples and advanced usage in the [SDK Documentation](03-sdk/01-overview.md). -- Dive into the specifics of our API in the [API Documentation](04-api/01-api-usage.md). - -Stay tuned for the complete source code. - -## Need Assistance? - -If you have questions about Sprinter, the code, the docs, or have a business inquiry, please reach out to us on [Discord](https://discord.gg/Qdf6GyNB5J) or via email at [requests@buildwithsygma.com](mailto:requests@buildwithsygma.com). diff --git a/docs/docs/01-introduction/01-introduction.md b/docs/docs/01-introduction/01-introduction.md new file mode 100644 index 0000000..cad901d --- /dev/null +++ b/docs/docs/01-introduction/01-introduction.md @@ -0,0 +1,31 @@ +--- +id: intro +title: What Is Sprinter? +sidebar_position: 1 +--- + +# Welcome To The Sprinter Docs + +Sprinter is a **fast, smooth, interoperable intent execution engine**. Our aim is to make multichain interactions feel like one. In doing so, we enhance cross-chain UX *for all* as a first-class citizen in both existing and upcoming web3 technologies. + +Sprinter provides execution for chain abstracton providers by operating a large cluster of solvers that are designed to: +- ⚖️ simplify cross-chain balance aggregation and transaction management +- 🔀 automatically provide optimized execution paths by determining the fastest and cheapest paths for a transfer, regardless of layer +- 🥰 provide the ultimate UX buff to users, applications, protocols, and wallets +- ⚙️ be unopinionated about account types (EOAs or smart contract accounts) + +The Sprinter solver engine creates capital efficiency across the cross-chain transaction flow by bearing equivocation risk for users and intent providers with our solvers. In effect, this optimizes the transaction supply chain for the user since we create the destination calldata. + +Just as the explosion of the EVM L2 ecosystem has brought about horizontal scalability for the entire Ethereum ecosystem, Sprinter amplifies this effect by facilitating movement of funds between all chains. + +## What's Next + +- If you're new to Sprinter, start with our [Getting Started Guide](../02-get-started.md). +- Explore detailed examples and advanced usage in the [SDK Documentation](../03-sdk/01-overview.md). +- Dive into the specifics of our API in the [API Documentation](../04-api/01-api-usage.md). + +Stay tuned for the complete source code. + +## Need Assistance? + +If you have questions about Sprinter, the code, the docs, or have a business inquiry, please reach out to us on [Discord](https://discord.gg/Qdf6GyNB5J) or via email at [requests@buildwithsygma.com](mailto:requests@buildwithsygma.com). diff --git a/docs/docs/01-introduction/01b-flow.md b/docs/docs/01-introduction/01b-flow.md new file mode 100644 index 0000000..33cb9cd --- /dev/null +++ b/docs/docs/01-introduction/01b-flow.md @@ -0,0 +1,57 @@ +--- +id: flow +title: Sprinter Application Flow +sidebar_position: 2 +--- + +The following section showcases how cross-chain balances and transactions are managed in a Sprinter-integrated application flow. + +### 1. Prepare User + +Before using Sprinter, the user must authenticate or connect to the decentralized application (dApp). This step is handled by your application, ensuring that the user is authenticated and their wallet is connected. + +### 2. Balance Aggregation + +Once the user is prepared, Sprinter can optionally aggregate the user's balances across multiple blockchains. This involves fetching data from different networks and consolidating it into a single view. + +### 3. Get Quote + +The next step is to get the transaction quote. This provides the necessary information for the dApp to execute the required transactions. Sprinter finds the best single-hop cross-bridge transaction to optimize this process. + +### 4. Execute Transaction + +After obtaining the transaction quote, the dApp executes the transaction. Sprinter provides the best options for the transaction, but the actual execution and transaction status monitoring is handled by the dApp. + +### 5. Error Handling + +Error handling is managed by the dApp. Sprinter ensures that it provides accurate data and options, but the dApp is responsible for handling any errors that may arise during the transaction process. + +## Diagram of the Sprinter Flow + +Below is a simplified diagram illustrating the Sprinter application flow: + +```plaintext ++------------------------+ +| Prepare User (Auth) | ++-----------+------------+ + | + v ++------------------------+ +| Balance Aggregation | ++-----------+------------+ + | + v ++------------------------+ +| Get Quote | ++-----------+------------+ + | + v ++------------------------+ +| Execute Transaction | ++-----------+------------+ + | + v ++------------------------+ +| Error Handling | ++------------------------+ +``` diff --git a/docs/docs/02-get-started.md b/docs/docs/02-get-started.md index 5be6c47..2f2d92c 100644 --- a/docs/docs/02-get-started.md +++ b/docs/docs/02-get-started.md @@ -1,19 +1,19 @@ --- -id: gettingstarted -title: Getting Started +id: quickstart +title: Quick Start sidebar_position: 2 --- -Depending on your needs, you have two main options for using the Sprinter SDK: +You have two main options for interacting with Sprinter: -1. **Using the SDK (Recommended for TypeScript and Web Framework Developers)** -2. **Calling APIs Directly** +- [Using the SDK](#using-the-sdk) +- [Calling API Endpoints Directly](#calling-api-endpoints-directly) ### Using the SDK -Using the Sprinter SDK provides a convenient and unified interface for blockchain interactions, complete with TypeScript support for enhanced type safety and a better development experience. This approach is particularly recommended for developers working with TypeScript or popular web frameworks. +Using the Sprinter SDK provides a convenient and unified interface for blockchain interactions, complete with TypeScript support for enhanced type safety and a better development experience. This approach is recommended for developers working with TypeScript or popular web frameworks. -#### Quick Example +**Quick Example** Here's a quick example of how to use the SDK in your project: @@ -31,14 +31,14 @@ For a more detailed guide on setting up and using the SDK, refer to the [SDK Doc If you prefer more control or wish to implement the solution in a different programming language, you can directly interact with the API endpoints provided by Sprinter. -#### Quick Example +**Quick Example** Here’s how you can call the API directly using JavaScript's Fetch API: ```javascript const ownerAddress = "0x3E101Ec02e7A48D16DADE204C96bFF842E7E2519"; const tokenSymbol = "USDC"; -const baseUrl = "https://your-api-url.com"; // Replace with your API base URL +const baseUrl = "https://api.sprinter.buildwithsygma.com/"; fetch(`${baseUrl}/accounts/${ownerAddress}/assets/fungible/${tokenSymbol}`) .then(response => response.json()) @@ -47,70 +47,3 @@ fetch(`${baseUrl}/accounts/${ownerAddress}/assets/fungible/${tokenSymbol}`) ``` For a comprehensive list of available endpoints and how to use them, check out the [API Documentation](04-api/01-api-usage.md). - -# Getting Started - -Welcome to the Sprinter SDK! This guide will introduce you to the application flow of Sprinter, explaining how it integrates with your application to manage cross-chain balances and transactions. - -## Sprinter Application Flow - -The Sprinter SDK is designed to streamline the process of interacting with multiple blockchain networks. Here's an overview of the typical flow of a sprinter-integrated application: - -### 1. Prepare User (Authentication or Connect to DApp) - -Before using Sprinter, the user must authenticate or connect to the decentralized application (DApp). This step is handled by your application, ensuring that the user is authenticated and their wallet is connected. - -### 2. Balance Aggregation (Optional) - -Once the user is prepared, Sprinter can optionally aggregate the user's balances across multiple blockchains. This involves fetching data from different networks and consolidating it into a single view. - -### 3. Get Quota - -The next step is to get the transaction quota. This provides the necessary information for the DApp to execute the required transactions. Sprinter finds the best single-hop cross-bridge transaction to optimize the process. - -### 4. Execute Transaction (Handled by DApp) - -After obtaining the transaction quota, the DApp executes the transaction. Sprinter provides the best options for the transaction, but the actual execution and following the transaction status are handled by the DApp. - -### 5. Error Handling (Handled by DApp) - -Error handling is managed by the DApp. Sprinter ensures that it provides accurate data and options, but the DApp is responsible for handling any errors that may arise during the transaction process. - -## Diagram of the Sprinter Flow - -Below is a simplified diagram illustrating the Sprinter application flow: - -```plaintext -+------------------------+ -| Prepare User (Auth) | -+-----------+------------+ - | - v -+------------------------+ -| Balance Aggregation | (Optional) -+-----------+------------+ - | - v -+------------------------+ -| Get Quota | -+-----------+------------+ - | - v -+------------------------+ -| Execute Transaction | (Handled by DApp) -+-----------+------------+ - | - v -+------------------------+ -| Error Handling | (Handled by DApp) -+------------------------+ -``` - -## Further Reading - -Now that you understand the Sprinter application flow, here are some next steps to dive deeper into specific areas: - -- **[SDK Documentation](03-sdk/01-overview.md)**: Learn how to set up and use the SDK in your application. -- **[API Documentation](04-api/04-user-assets.md)**: Explore the API endpoints provided by Sprinter for direct integration. - -We hope this guide provides a clear understanding of the Sprinter application flow. If you have any questions or need further assistance, feel free to reach out. Happy coding! diff --git a/docs/docusaurus.config.ts b/docs/docusaurus.config.ts index 6a6f85a..1809f01 100644 --- a/docs/docusaurus.config.ts +++ b/docs/docusaurus.config.ts @@ -62,12 +62,7 @@ const config: Config = { // label: 'Docs', // } { - href: 'https://poc.sprinter.buildwithsygma.com/', - label: 'POC', - position: 'left', - }, - { - to: 'docs/gettingstarted', + to: 'docs/quickstart', position: 'left', label: 'Learn', }, @@ -76,6 +71,16 @@ const config: Config = { position: 'left', label: 'API', }, + { + href: 'https://poc.sprinter.buildwithsygma.com/', + label: 'POC', + position: 'left', + }, + { + href: 'https://api.test.sprinter.buildwithsygma.com/swagger/index.html', + label: 'Swagger', + position: 'right', + }, { href: 'https://github.com/ChainSafe/sprinter-ts', label: 'GitHub', @@ -114,6 +119,10 @@ const config: Config = { label: 'Discord', href: 'https://discord.gg/Qdf6GyNB5J', }, + { + label: 'YouTube', + href: 'https://youtube.com/@buildwithsygma', + }, ], }, { @@ -127,6 +136,10 @@ const config: Config = { label: 'GitHub', href: 'https://github.com/ChainSafe/sprinter-ts', }, + { + label: 'Swagger', + href: 'https://api.test.sprinter.buildwithsygma.com/swagger/index.html', + }, { label: 'Blog', href: 'https://blog.buildwithsygma.com', @@ -141,6 +154,17 @@ const config: Config = { darkTheme: prismThemes.dracula, }, } satisfies Preset.ThemeConfig, + plugins: [ + [ + require.resolve("@cmfcmf/docusaurus-search-local"), + { + indexBlog: false, + indexPages: false, + indexDocs: true, + }, + ], + ], }; + export default config; diff --git a/docs/package.json b/docs/package.json index 788056a..46b36cb 100644 --- a/docs/package.json +++ b/docs/package.json @@ -15,6 +15,7 @@ "typecheck": "tsc" }, "dependencies": { + "@cmfcmf/docusaurus-search-local": "^1.2.0", "@docusaurus/core": "3.4.0", "@docusaurus/preset-classic": "3.4.0", "@mdx-js/react": "^3.0.0", diff --git a/docs/src/pages/index.tsx b/docs/src/pages/index.tsx index 2549713..70ccadd 100644 --- a/docs/src/pages/index.tsx +++ b/docs/src/pages/index.tsx @@ -16,12 +16,12 @@ function HomepageHeader() { {siteConfig.title}

- Multichain interactions that feel like one + Multichain interactions that feel like one

+ to="/docs/introduction"> Get Started
From 22c7dbca13325e34f2b1ee70e699821bd7a61fd7 Mon Sep 17 00:00:00 2001 From: haochizzle Date: Tue, 6 Aug 2024 23:27:44 +0800 Subject: [PATCH 06/36] rename quickstart.md --- docs/docs/01-introduction/01-introduction.md | 2 +- docs/docs/{02-get-started.md => 02-quick-start.md} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename docs/docs/{02-get-started.md => 02-quick-start.md} (100%) diff --git a/docs/docs/01-introduction/01-introduction.md b/docs/docs/01-introduction/01-introduction.md index cad901d..af8aa2b 100644 --- a/docs/docs/01-introduction/01-introduction.md +++ b/docs/docs/01-introduction/01-introduction.md @@ -20,7 +20,7 @@ Just as the explosion of the EVM L2 ecosystem has brought about horizontal scala ## What's Next -- If you're new to Sprinter, start with our [Getting Started Guide](../02-get-started.md). +- If you're new to Sprinter, start with our [Getting Started Guide](../02-quick-start.md). - Explore detailed examples and advanced usage in the [SDK Documentation](../03-sdk/01-overview.md). - Dive into the specifics of our API in the [API Documentation](../04-api/01-api-usage.md). diff --git a/docs/docs/02-get-started.md b/docs/docs/02-quick-start.md similarity index 100% rename from docs/docs/02-get-started.md rename to docs/docs/02-quick-start.md From 985440598a45625e568b105d5ef905f3ed3049ae Mon Sep 17 00:00:00 2001 From: haochizzle Date: Tue, 6 Aug 2024 23:38:21 +0800 Subject: [PATCH 07/36] update config --- docs/docusaurus.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docusaurus.config.ts b/docs/docusaurus.config.ts index 1809f01..62cdc61 100644 --- a/docs/docusaurus.config.ts +++ b/docs/docusaurus.config.ts @@ -96,7 +96,7 @@ const config: Config = { items: [ { label: 'Introduction', - to: '/docs/intro', + to: '/docs/introduction', }, { label: 'SDK', From 87f8327cbe40c59ea7cf136a72e97a844dbb61c1 Mon Sep 17 00:00:00 2001 From: haochizzle Date: Wed, 7 Aug 2024 00:02:12 +0800 Subject: [PATCH 08/36] add key features page --- docs/docs/01-introduction/01-introduction.md | 10 ------ docs/docs/01-introduction/01b-flow.md | 2 +- docs/docs/01-introduction/02-key-features.md | 38 ++++++++++++++++++++ 3 files changed, 39 insertions(+), 11 deletions(-) create mode 100644 docs/docs/01-introduction/02-key-features.md diff --git a/docs/docs/01-introduction/01-introduction.md b/docs/docs/01-introduction/01-introduction.md index af8aa2b..20e8819 100644 --- a/docs/docs/01-introduction/01-introduction.md +++ b/docs/docs/01-introduction/01-introduction.md @@ -8,16 +8,6 @@ sidebar_position: 1 Sprinter is a **fast, smooth, interoperable intent execution engine**. Our aim is to make multichain interactions feel like one. In doing so, we enhance cross-chain UX *for all* as a first-class citizen in both existing and upcoming web3 technologies. -Sprinter provides execution for chain abstracton providers by operating a large cluster of solvers that are designed to: -- ⚖️ simplify cross-chain balance aggregation and transaction management -- 🔀 automatically provide optimized execution paths by determining the fastest and cheapest paths for a transfer, regardless of layer -- 🥰 provide the ultimate UX buff to users, applications, protocols, and wallets -- ⚙️ be unopinionated about account types (EOAs or smart contract accounts) - -The Sprinter solver engine creates capital efficiency across the cross-chain transaction flow by bearing equivocation risk for users and intent providers with our solvers. In effect, this optimizes the transaction supply chain for the user since we create the destination calldata. - -Just as the explosion of the EVM L2 ecosystem has brought about horizontal scalability for the entire Ethereum ecosystem, Sprinter amplifies this effect by facilitating movement of funds between all chains. - ## What's Next - If you're new to Sprinter, start with our [Getting Started Guide](../02-quick-start.md). diff --git a/docs/docs/01-introduction/01b-flow.md b/docs/docs/01-introduction/01b-flow.md index 33cb9cd..9d3f330 100644 --- a/docs/docs/01-introduction/01b-flow.md +++ b/docs/docs/01-introduction/01b-flow.md @@ -1,7 +1,7 @@ --- id: flow title: Sprinter Application Flow -sidebar_position: 2 +sidebar_position: 5 --- The following section showcases how cross-chain balances and transactions are managed in a Sprinter-integrated application flow. diff --git a/docs/docs/01-introduction/02-key-features.md b/docs/docs/01-introduction/02-key-features.md new file mode 100644 index 0000000..6aaa47a --- /dev/null +++ b/docs/docs/01-introduction/02-key-features.md @@ -0,0 +1,38 @@ +--- +id: features +title: Key Features +sidebar_position: 2 +--- + +- [Fast](#fast) +- [Smooth](#smooth) +- [Interoperable](#interoperable) + +Sprinter provides execution for chain abstracton providers by operating a large cluster of solvers that are designed to: +- ⚖️ simplify cross-chain balance aggregation and transaction management +- 🔀 automatically provide optimized execution paths by determining the fastest and cheapest paths for a transfer, regardless of layer +- 🥰 provide the ultimate UX buff to users, applications, protocols, and wallets +- ⚙️ be unopinionated about account types (EOAs or smart contract accounts) + +The Sprinter solver engine creates capital efficiency across the cross-chain transaction flow by bearing equivocation risk for users and intent providers with our solvers. In effect, this optimizes the transaction supply chain for the user since we create the destination calldata. + +Just as the explosion of the EVM L2 ecosystem has brought about horizontal scalability for the entire Ethereum ecosystem, Sprinter amplifies this effect by facilitating movement of funds between all chains. + +## Fast + +- **Extensive Route Search**: Our solvers explore a wide array of routes to access deeper liquidity pools. +- **Execution Guarantee**: Ensures transaction execution through our advanced mechanism. +- **Just-in-Time (JIT) Liquidity**: Provides JIT liquidity and capital fronting to facilitate transactions efficiently. + +## Smooth + +- **Flexible Account Compatibility**: Supports both externally owned accounts (EOA) and smart contract wallets. +- **Minimized Slippage**: Quotes are derived from multiple pools across various intent protocols to minimize slippage. +- **One-Click Solutions**: Enables seamless and straightforward one-click solutions for user convenience. + +## Interoperable + +- **Multi-Protocol Integration**: Our solvers integrate with multiple protocols to enhance functionality. +- **Account Type Agnostic**: Operates seamlessly regardless of account type. +- **Wallet Implementation Agnostic**: Functions efficiently with various wallet implementations. +- **Flexible Capital Fronting**: Capable of fronting capital across different networks as needed. \ No newline at end of file From c0724ee5e8893b27a92f1704829d39fbaed4147f Mon Sep 17 00:00:00 2001 From: haochizzle Date: Wed, 7 Aug 2024 00:11:13 +0800 Subject: [PATCH 09/36] update yarn.lock file; add supported networks page --- .../{01b-flow.md => 03-flow.md} | 2 +- .../01-introduction/04-supported-networks.md | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) rename docs/docs/01-introduction/{01b-flow.md => 03-flow.md} (99%) create mode 100644 docs/docs/01-introduction/04-supported-networks.md diff --git a/docs/docs/01-introduction/01b-flow.md b/docs/docs/01-introduction/03-flow.md similarity index 99% rename from docs/docs/01-introduction/01b-flow.md rename to docs/docs/01-introduction/03-flow.md index 9d3f330..a15c7f5 100644 --- a/docs/docs/01-introduction/01b-flow.md +++ b/docs/docs/01-introduction/03-flow.md @@ -1,7 +1,7 @@ --- id: flow title: Sprinter Application Flow -sidebar_position: 5 +sidebar_position: 3 --- The following section showcases how cross-chain balances and transactions are managed in a Sprinter-integrated application flow. diff --git a/docs/docs/01-introduction/04-supported-networks.md b/docs/docs/01-introduction/04-supported-networks.md new file mode 100644 index 0000000..421e339 --- /dev/null +++ b/docs/docs/01-introduction/04-supported-networks.md @@ -0,0 +1,22 @@ +--- +id: supported +title: Supported Bridges And Networks +sidebar_position: 4 +--- + +## Supported Bridges + +Sprinter currently supports the following bridging protocols: +- [LI.FI](https://li.fi/) +- [Across](https://across.to/) +- [Sygma](https://buildwithsygma.com) + +## Supported Networks + +Sprinter currently supports the following blockchain networks: +- Ethereum Mainnet +- Base +- Arbitrum +- Polygon +- Gnosis +- Cronos \ No newline at end of file From 170778a22bb706b09d21ee7527be86caefe9254e Mon Sep 17 00:00:00 2001 From: haochizzle Date: Wed, 7 Aug 2024 00:19:15 +0800 Subject: [PATCH 10/36] github actions temp update on yarn --- .github/workflows/ci.yml | 2 +- yarn.lock | 311 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 306 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6febc0..0744b38 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: node-version: 20 - run: corepack enable - name: Install deps - run: yarn --immutable + run: yarn - name: Lint run: yarn run lint - name: Build diff --git a/yarn.lock b/yarn.lock index 8fd1079..43e2737 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,6 +12,16 @@ __metadata: languageName: node linkType: hard +"@algolia/autocomplete-core@npm:1.17.4": + version: 1.17.4 + resolution: "@algolia/autocomplete-core@npm:1.17.4" + dependencies: + "@algolia/autocomplete-plugin-algolia-insights": 1.17.4 + "@algolia/autocomplete-shared": 1.17.4 + checksum: 1f531ab8cc728dfc20a28e29b3f127c49d78cd7fc3ccb2849cc9a40138912b3c656682e98388448fbc1c64ca7855479d5ebbf224cb6072e0c7e64d91aa71fa7a + languageName: node + linkType: hard + "@algolia/autocomplete-core@npm:1.9.3": version: 1.9.3 resolution: "@algolia/autocomplete-core@npm:1.9.3" @@ -22,6 +32,33 @@ __metadata: languageName: node linkType: hard +"@algolia/autocomplete-js@npm:^1.8.2": + version: 1.17.4 + resolution: "@algolia/autocomplete-js@npm:1.17.4" + dependencies: + "@algolia/autocomplete-core": 1.17.4 + "@algolia/autocomplete-preset-algolia": 1.17.4 + "@algolia/autocomplete-shared": 1.17.4 + htm: ^3.1.1 + preact: ^10.13.2 + peerDependencies: + "@algolia/client-search": ">= 4.5.1 < 6" + algoliasearch: ">= 4.9.1 < 6" + checksum: 023d5f01432739251aba60197a20e1c3e93f0de6357643c5b56c50e143427ef182d7515d03a2349c403410608eddf7e4adca6f0b565bf74bcf351b6b4e5398a3 + languageName: node + linkType: hard + +"@algolia/autocomplete-plugin-algolia-insights@npm:1.17.4": + version: 1.17.4 + resolution: "@algolia/autocomplete-plugin-algolia-insights@npm:1.17.4" + dependencies: + "@algolia/autocomplete-shared": 1.17.4 + peerDependencies: + search-insights: ">= 1 < 3" + checksum: 0c9228c8a6e170b3b53939c3ff0cf0504a635bb33aeb6d22c084a2fcf79178ffaa5075c032d7af03a4abfbb533a925a347920396520b45cef23b2342c685a4b1 + languageName: node + linkType: hard + "@algolia/autocomplete-plugin-algolia-insights@npm:1.9.3": version: 1.9.3 resolution: "@algolia/autocomplete-plugin-algolia-insights@npm:1.9.3" @@ -33,6 +70,18 @@ __metadata: languageName: node linkType: hard +"@algolia/autocomplete-preset-algolia@npm:1.17.4": + version: 1.17.4 + resolution: "@algolia/autocomplete-preset-algolia@npm:1.17.4" + dependencies: + "@algolia/autocomplete-shared": 1.17.4 + peerDependencies: + "@algolia/client-search": ">= 4.9.1 < 6" + algoliasearch: ">= 4.9.1 < 6" + checksum: 461836d865e9fa69f0444d6cbfdc1805d89d16f492913b9177180244d167bb48dcca44dbd650f1d9f431f3450792ec61daaebc0fcc1bb7bb57aab3144e7ae27a + languageName: node + linkType: hard + "@algolia/autocomplete-preset-algolia@npm:1.9.3": version: 1.9.3 resolution: "@algolia/autocomplete-preset-algolia@npm:1.9.3" @@ -45,6 +94,16 @@ __metadata: languageName: node linkType: hard +"@algolia/autocomplete-shared@npm:1.17.4": + version: 1.17.4 + resolution: "@algolia/autocomplete-shared@npm:1.17.4" + peerDependencies: + "@algolia/client-search": ">= 4.9.1 < 6" + algoliasearch: ">= 4.9.1 < 6" + checksum: 37d9c429262b278eb1c880d216620e9982b23c9a31a219eaf5dd37a19e9196badd1a97bede4e29ef077305292ef7ccdc9a195f477175ef89ce09f7dee60d0deb + languageName: node + linkType: hard + "@algolia/autocomplete-shared@npm:1.9.3": version: 1.9.3 resolution: "@algolia/autocomplete-shared@npm:1.9.3" @@ -55,6 +114,13 @@ __metadata: languageName: node linkType: hard +"@algolia/autocomplete-theme-classic@npm:^1.8.2": + version: 1.17.4 + resolution: "@algolia/autocomplete-theme-classic@npm:1.17.4" + checksum: d328e0ccc9419f6017329c9950f88c018d7c6f4a8084372f86d16bcc6e950527201ecaa25836065ec81f0b1c50749cfe647d007bcfe00266379f55b135dd5bac + languageName: node + linkType: hard + "@algolia/cache-browser-local-storage@npm:4.23.3": version: 4.23.3 resolution: "@algolia/cache-browser-local-storage@npm:4.23.3" @@ -64,6 +130,15 @@ __metadata: languageName: node linkType: hard +"@algolia/cache-browser-local-storage@npm:4.24.0": + version: 4.24.0 + resolution: "@algolia/cache-browser-local-storage@npm:4.24.0" + dependencies: + "@algolia/cache-common": 4.24.0 + checksum: 68823c3b1c07dab093de98e678e2ff7fcf7a40915a157715f6f51d073e3865086be98cbbe554b7bf9e0514db5dd9e726033e27e566d9e5db059cb5059c3436cc + languageName: node + linkType: hard + "@algolia/cache-common@npm:4.23.3": version: 4.23.3 resolution: "@algolia/cache-common@npm:4.23.3" @@ -71,6 +146,13 @@ __metadata: languageName: node linkType: hard +"@algolia/cache-common@npm:4.24.0": + version: 4.24.0 + resolution: "@algolia/cache-common@npm:4.24.0" + checksum: ad481ad50d7ea92d0cce525757627f4a647b5373dc6d3cbed6405d05cb83f21a110919e7133e5233d5b13c2c8f59ed9e927efdbc82e70571707709075b07d2c6 + languageName: node + linkType: hard + "@algolia/cache-in-memory@npm:4.23.3": version: 4.23.3 resolution: "@algolia/cache-in-memory@npm:4.23.3" @@ -80,6 +162,15 @@ __metadata: languageName: node linkType: hard +"@algolia/cache-in-memory@npm:4.24.0": + version: 4.24.0 + resolution: "@algolia/cache-in-memory@npm:4.24.0" + dependencies: + "@algolia/cache-common": 4.24.0 + checksum: 2956600b2722f113373dbb71449f546afb5a0fb1a3d1558a1a3e957b7a630d1f25045c29646c8dbb44cdffe6ff4c9d1219bf63fc9fd8e4d5467381c7150e09f9 + languageName: node + linkType: hard + "@algolia/client-account@npm:4.23.3": version: 4.23.3 resolution: "@algolia/client-account@npm:4.23.3" @@ -91,6 +182,17 @@ __metadata: languageName: node linkType: hard +"@algolia/client-account@npm:4.24.0": + version: 4.24.0 + resolution: "@algolia/client-account@npm:4.24.0" + dependencies: + "@algolia/client-common": 4.24.0 + "@algolia/client-search": 4.24.0 + "@algolia/transporter": 4.24.0 + checksum: 3dd52dd692a2194eb45844280e6261192d5a4ef99aec729a09a01da5cf071fd77b37c6d164bf8877823efc1484d576068d76ada764a4f0624238a3475bc199b2 + languageName: node + linkType: hard + "@algolia/client-analytics@npm:4.23.3": version: 4.23.3 resolution: "@algolia/client-analytics@npm:4.23.3" @@ -103,6 +205,18 @@ __metadata: languageName: node linkType: hard +"@algolia/client-analytics@npm:4.24.0": + version: 4.24.0 + resolution: "@algolia/client-analytics@npm:4.24.0" + dependencies: + "@algolia/client-common": 4.24.0 + "@algolia/client-search": 4.24.0 + "@algolia/requester-common": 4.24.0 + "@algolia/transporter": 4.24.0 + checksum: 8d02e6d0eb0dcde099832c62fa7d7e9910b2757b4d37e07e1eefb65a12fef7e7ce3d73fda23e8ee02d53953a91efc15086016b1af5e9fea9227dfc0fc61c9f63 + languageName: node + linkType: hard + "@algolia/client-common@npm:4.23.3": version: 4.23.3 resolution: "@algolia/client-common@npm:4.23.3" @@ -113,6 +227,16 @@ __metadata: languageName: node linkType: hard +"@algolia/client-common@npm:4.24.0": + version: 4.24.0 + resolution: "@algolia/client-common@npm:4.24.0" + dependencies: + "@algolia/requester-common": 4.24.0 + "@algolia/transporter": 4.24.0 + checksum: 9e75d0bb51bb04f099e823e4397d1bac6659e1ecb7c7a73a5eaf9153632d544bd6c62a4961b606490220b236361eb8b7b77a5e4c47f12aefdd2952b14ce2fd18 + languageName: node + linkType: hard + "@algolia/client-personalization@npm:4.23.3": version: 4.23.3 resolution: "@algolia/client-personalization@npm:4.23.3" @@ -124,6 +248,17 @@ __metadata: languageName: node linkType: hard +"@algolia/client-personalization@npm:4.24.0": + version: 4.24.0 + resolution: "@algolia/client-personalization@npm:4.24.0" + dependencies: + "@algolia/client-common": 4.24.0 + "@algolia/requester-common": 4.24.0 + "@algolia/transporter": 4.24.0 + checksum: 9193e032841ae991ce6dd8c8988608d0d83a6785681abf26055812506aaf070db8d8f44403d0270384ff39530677603d103c330a869a397181d594bebe46b4b0 + languageName: node + linkType: hard + "@algolia/client-search@npm:4.23.3": version: 4.23.3 resolution: "@algolia/client-search@npm:4.23.3" @@ -135,6 +270,17 @@ __metadata: languageName: node linkType: hard +"@algolia/client-search@npm:4.24.0, @algolia/client-search@npm:^4.12.0": + version: 4.24.0 + resolution: "@algolia/client-search@npm:4.24.0" + dependencies: + "@algolia/client-common": 4.24.0 + "@algolia/requester-common": 4.24.0 + "@algolia/transporter": 4.24.0 + checksum: d161235014fa73acc0ff04d737c695b7357c060d31db6d602464b27ba846208c6aeb35b179e76d4c33b51329b77de0c460f6cb21b66d364c18a5534874c7b987 + languageName: node + linkType: hard + "@algolia/events@npm:^4.0.1": version: 4.0.1 resolution: "@algolia/events@npm:4.0.1" @@ -149,6 +295,13 @@ __metadata: languageName: node linkType: hard +"@algolia/logger-common@npm:4.24.0": + version: 4.24.0 + resolution: "@algolia/logger-common@npm:4.24.0" + checksum: 1ebe93901a2b3ce41696b535d028337c1c6a98a4262868117c16dd603cc8bb106b840e45cf53c08d098cf518e07bedc64a59cc86bef18795dc49031c2c208d31 + languageName: node + linkType: hard + "@algolia/logger-console@npm:4.23.3": version: 4.23.3 resolution: "@algolia/logger-console@npm:4.23.3" @@ -158,6 +311,15 @@ __metadata: languageName: node linkType: hard +"@algolia/logger-console@npm:4.24.0": + version: 4.24.0 + resolution: "@algolia/logger-console@npm:4.24.0" + dependencies: + "@algolia/logger-common": 4.24.0 + checksum: fdfa3983e6c38cc7b69d66e1085ac702e009d693bd49d64b27cad9ba4197788a8784529a8ed9c25e6ccd51cc4ad3a2427241ecc322c22ca2c8ce6a8d4d94fe69 + languageName: node + linkType: hard + "@algolia/recommend@npm:4.23.3": version: 4.23.3 resolution: "@algolia/recommend@npm:4.23.3" @@ -177,6 +339,25 @@ __metadata: languageName: node linkType: hard +"@algolia/recommend@npm:4.24.0": + version: 4.24.0 + resolution: "@algolia/recommend@npm:4.24.0" + dependencies: + "@algolia/cache-browser-local-storage": 4.24.0 + "@algolia/cache-common": 4.24.0 + "@algolia/cache-in-memory": 4.24.0 + "@algolia/client-common": 4.24.0 + "@algolia/client-search": 4.24.0 + "@algolia/logger-common": 4.24.0 + "@algolia/logger-console": 4.24.0 + "@algolia/requester-browser-xhr": 4.24.0 + "@algolia/requester-common": 4.24.0 + "@algolia/requester-node-http": 4.24.0 + "@algolia/transporter": 4.24.0 + checksum: 685fb5c1d85d7b9fd39d9246b49da5be4199fecc144bb350ed92fc191b66e4e1101ee6df9ca857ac5096f587638fa3366e01ddca0258f11000aa092ed68daea3 + languageName: node + linkType: hard + "@algolia/requester-browser-xhr@npm:4.23.3": version: 4.23.3 resolution: "@algolia/requester-browser-xhr@npm:4.23.3" @@ -186,6 +367,15 @@ __metadata: languageName: node linkType: hard +"@algolia/requester-browser-xhr@npm:4.24.0": + version: 4.24.0 + resolution: "@algolia/requester-browser-xhr@npm:4.24.0" + dependencies: + "@algolia/requester-common": 4.24.0 + checksum: 2d277b291bcc0a388f114116879c15a96c057f698b026c32e719b354c2e2e03e05b3c304f45d2354eb4dd8dfa519d481af51ce8ef19b6fb4fd6d384cf41373de + languageName: node + linkType: hard + "@algolia/requester-common@npm:4.23.3": version: 4.23.3 resolution: "@algolia/requester-common@npm:4.23.3" @@ -193,6 +383,13 @@ __metadata: languageName: node linkType: hard +"@algolia/requester-common@npm:4.24.0": + version: 4.24.0 + resolution: "@algolia/requester-common@npm:4.24.0" + checksum: cf88ca1f04f4243515bbfa05d7cf51afe6a57904390d9e1ccab799bae20f6fa77e954d9eee9d5c718086582aeb478e271ccf1d5a6a5ab943494250dce820268e + languageName: node + linkType: hard + "@algolia/requester-node-http@npm:4.23.3": version: 4.23.3 resolution: "@algolia/requester-node-http@npm:4.23.3" @@ -202,6 +399,15 @@ __metadata: languageName: node linkType: hard +"@algolia/requester-node-http@npm:4.24.0": + version: 4.24.0 + resolution: "@algolia/requester-node-http@npm:4.24.0" + dependencies: + "@algolia/requester-common": 4.24.0 + checksum: e9cef1463f29035a44f12941ddeb343a213ff512c61ade46a07db19b2023f49a5ac12024a3f56d8b9c0c5b2bd32466030c5e27b26a6a6e17773b810388ddb3b7 + languageName: node + linkType: hard + "@algolia/transporter@npm:4.23.3": version: 4.23.3 resolution: "@algolia/transporter@npm:4.23.3" @@ -213,6 +419,17 @@ __metadata: languageName: node linkType: hard +"@algolia/transporter@npm:4.24.0": + version: 4.24.0 + resolution: "@algolia/transporter@npm:4.24.0" + dependencies: + "@algolia/cache-common": 4.24.0 + "@algolia/logger-common": 4.24.0 + "@algolia/requester-common": 4.24.0 + checksum: 9eee8e6613c8d2a5562e4df284dc7b0804a7bf80586fd8512ad769dc4829f947a334480378d94efd3cc57ca4d400886eb677786a3c5664f85881093f9e27cab7 + languageName: node + linkType: hard + "@alloc/quick-lru@npm:^5.2.0": version: 5.2.0 resolution: "@alloc/quick-lru@npm:5.2.0" @@ -1787,6 +2004,29 @@ __metadata: languageName: node linkType: hard +"@cmfcmf/docusaurus-search-local@npm:^1.2.0": + version: 1.2.0 + resolution: "@cmfcmf/docusaurus-search-local@npm:1.2.0" + dependencies: + "@algolia/autocomplete-js": ^1.8.2 + "@algolia/autocomplete-theme-classic": ^1.8.2 + "@algolia/client-search": ^4.12.0 + algoliasearch: ^4.12.0 + cheerio: ^1.0.0-rc.9 + clsx: ^1.1.1 + lunr-languages: ^1.4.0 + mark.js: ^8.11.1 + tslib: ^2.6.3 + peerDependencies: + "@docusaurus/core": ^2.0.0 + nodejieba: ^2.5.0 + peerDependenciesMeta: + nodejieba: + optional: true + checksum: d188f7b31be67a5e0699d07b44c112f151dec7cc6c8fd79a3670903231f6a31b924f95620d98102c1db645c099bd03e626e3c4ed5d8123cf175ed7d0c3ca9d6e + languageName: node + linkType: hard + "@colors/colors@npm:1.5.0": version: 1.5.0 resolution: "@colors/colors@npm:1.5.0" @@ -4769,6 +5009,29 @@ __metadata: languageName: node linkType: hard +"algoliasearch@npm:^4.12.0": + version: 4.24.0 + resolution: "algoliasearch@npm:4.24.0" + dependencies: + "@algolia/cache-browser-local-storage": 4.24.0 + "@algolia/cache-common": 4.24.0 + "@algolia/cache-in-memory": 4.24.0 + "@algolia/client-account": 4.24.0 + "@algolia/client-analytics": 4.24.0 + "@algolia/client-common": 4.24.0 + "@algolia/client-personalization": 4.24.0 + "@algolia/client-search": 4.24.0 + "@algolia/logger-common": 4.24.0 + "@algolia/logger-console": 4.24.0 + "@algolia/recommend": 4.24.0 + "@algolia/requester-browser-xhr": 4.24.0 + "@algolia/requester-common": 4.24.0 + "@algolia/requester-node-http": 4.24.0 + "@algolia/transporter": 4.24.0 + checksum: ef09096619191181f3ea3376ed46b5bb2de1cd7d97a8d016f7cfe8e93c89d34f38cac8db5835314f8d97c939ad007c3dde716c1609953540258352edb25d12c2 + languageName: node + linkType: hard + "algoliasearch@npm:^4.18.0, algoliasearch@npm:^4.19.1": version: 4.23.3 resolution: "algoliasearch@npm:4.23.3" @@ -5547,7 +5810,7 @@ __metadata: languageName: node linkType: hard -"cheerio@npm:^1.0.0-rc.12": +"cheerio@npm:^1.0.0-rc.12, cheerio@npm:^1.0.0-rc.9": version: 1.0.0-rc.12 resolution: "cheerio@npm:1.0.0-rc.12" dependencies: @@ -5649,6 +5912,13 @@ __metadata: languageName: node linkType: hard +"clsx@npm:^1.1.1": + version: 1.2.1 + resolution: "clsx@npm:1.2.1" + checksum: 34dead8bee24f5e96f6e7937d711978380647e936a22e76380290e35486afd8634966ce300fc4b74a32f3762c7d4c0303f442c3e259f4ce02374eb0c82834f27 + languageName: node + linkType: hard + "clsx@npm:^2.0.0": version: 2.1.1 resolution: "clsx@npm:2.1.1" @@ -6566,6 +6836,7 @@ __metadata: version: 0.0.0-use.local resolution: "docs@workspace:docs" dependencies: + "@cmfcmf/docusaurus-search-local": ^1.2.0 "@docusaurus/core": 3.4.0 "@docusaurus/module-type-aliases": 3.4.0 "@docusaurus/preset-classic": 3.4.0 @@ -8760,6 +9031,13 @@ __metadata: languageName: node linkType: hard +"htm@npm:^3.1.1": + version: 3.1.1 + resolution: "htm@npm:3.1.1" + checksum: 0de4c8fff2b8e76c162235ae80dbf93ca5eef1575bd50596a06ce9bebf1a6da5efc467417c53034a9ffa2ab9ecff819cbec041dc9087894b2b900ad4de26c7e7 + languageName: node + linkType: hard + "html-entities@npm:^2.3.2": version: 2.5.2 resolution: "html-entities@npm:2.5.2" @@ -10149,6 +10427,13 @@ __metadata: languageName: node linkType: hard +"lunr-languages@npm:^1.4.0": + version: 1.14.0 + resolution: "lunr-languages@npm:1.14.0" + checksum: 5dc26fa75c8f3f14a69b3d54ae1228907b3552bc26727a14c5f302aab05d2547a924d095f075c9d3439756a38e2dafb78d1b74fc862dc290a13ddce236a55e87 + languageName: node + linkType: hard + "magic-string@npm:^0.25.3": version: 0.25.9 resolution: "magic-string@npm:0.25.9" @@ -10187,6 +10472,13 @@ __metadata: languageName: node linkType: hard +"mark.js@npm:^8.11.1": + version: 8.11.1 + resolution: "mark.js@npm:8.11.1" + checksum: 5e69e776db61abdd857b5cbb7070c8a3b1b0e5c12bf077fcd5a8c6f17b1f85ed65275aba5662b57136d1b9f82b54bb34d4ef4220f7703c9a7ab806ae1e208cff + languageName: node + linkType: hard + "markdown-extensions@npm:^2.0.0": version: 2.0.0 resolution: "markdown-extensions@npm:2.0.0" @@ -12662,6 +12954,13 @@ __metadata: languageName: node linkType: hard +"preact@npm:^10.13.2": + version: 10.23.1 + resolution: "preact@npm:10.23.1" + checksum: f0eb37999bfa9cbc725e57e189387c77919fa05d17cdc3c4ff41660298805159867689f1d974eb8e6496288c0212760490d0e6f1c12022e0f5a74d06cc618e85 + languageName: node + linkType: hard + "prelude-ls@npm:^1.2.1": version: 1.2.1 resolution: "prelude-ls@npm:1.2.1" @@ -15029,7 +15328,7 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.0.3, tslib@npm:^2.6.0": +"tslib@npm:^2.0.3, tslib@npm:^2.6.0, tslib@npm:^2.6.3": version: 2.6.3 resolution: "tslib@npm:2.6.3" checksum: 2598aef53d9dbe711af75522464b2104724d6467b26a60f2bdac8297d2b5f1f6b86a71f61717384aa8fd897240467aaa7bcc36a0700a0faf751293d1331db39a @@ -15153,11 +15452,11 @@ __metadata: "typescript@patch:typescript@^5.0.0#~builtin": version: 5.4.5 - resolution: "typescript@patch:typescript@npm%3A5.4.5#~builtin::version=5.4.5&hash=5adc0c" + resolution: "typescript@patch:typescript@npm%3A5.4.5#~builtin::version=5.4.5&hash=5da071" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: db2ad2a16ca829f50427eeb1da155e7a45e598eec7b086d8b4e8ba44e5a235f758e606d681c66992230d3fc3b8995865e5fd0b22a2c95486d0b3200f83072ec9 + checksum: 9cf4c053893bcf327d101b6c024a55baf05430dc30263f9adb1bf354aeffc11306fe1f23ba2f9a0209674359f16219b5b7d229e923477b94831d07d5a33a4217 languageName: node linkType: hard @@ -15173,11 +15472,11 @@ __metadata: "typescript@patch:typescript@~5.2.2#~builtin": version: 5.2.2 - resolution: "typescript@patch:typescript@npm%3A5.2.2#~builtin::version=5.2.2&hash=f3b441" + resolution: "typescript@patch:typescript@npm%3A5.2.2#~builtin::version=5.2.2&hash=5da071" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 062c1cee1990e6b9419ce8a55162b8dc917eb87f807e4de0327dbc1c2fa4e5f61bc0dd4e034d38ff541d1ed0479b53bcee8e4de3a4075c51a1724eb6216cb6f5 + checksum: 303979762f9b8932c53f8149e866521a1265168b5c0fde8cc8ad83ac3d0e8ede8096cb02dff5f2de048e7f118a6f61902f81da12d5972c7fb582f09f2f18d169 languageName: node linkType: hard From 430ea6c5e1a77be24353685a6567f54514d714c6 Mon Sep 17 00:00:00 2001 From: haochizzle Date: Wed, 7 Aug 2024 00:20:08 +0800 Subject: [PATCH 11/36] immutable yarn --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0744b38..b6febc0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: node-version: 20 - run: corepack enable - name: Install deps - run: yarn + run: yarn --immutable - name: Lint run: yarn run lint - name: Build From 141666cb977e42a7fe04ef8500e0382b601fa61f Mon Sep 17 00:00:00 2001 From: haochizzle Date: Wed, 7 Aug 2024 00:23:45 +0800 Subject: [PATCH 12/36] test ci --- docs/docs/01-introduction/04-supported-networks.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/docs/01-introduction/04-supported-networks.md b/docs/docs/01-introduction/04-supported-networks.md index 421e339..a0449d9 100644 --- a/docs/docs/01-introduction/04-supported-networks.md +++ b/docs/docs/01-introduction/04-supported-networks.md @@ -19,4 +19,6 @@ Sprinter currently supports the following blockchain networks: - Arbitrum - Polygon - Gnosis -- Cronos \ No newline at end of file +- Cronos + + \ No newline at end of file From 81c937876d275c654865ace8e46b0d382e5249f5 Mon Sep 17 00:00:00 2001 From: haochizzle Date: Wed, 7 Aug 2024 00:28:25 +0800 Subject: [PATCH 13/36] ci.yml --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b6febc0..6f55ef5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,6 +23,8 @@ jobs: run: yarn run lint - name: Build run: yarn build + env: + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} - name: "Unit Tests" run: 'yarn run test:unit' - name: "Integrations Tests" @@ -44,4 +46,4 @@ jobs: projectName: gopher-docs directory: ./docs/build gitHubToken: ${{ secrets.GITHUB_TOKEN }} - branch: ${{ github.head_ref || github.ref_name }} + branch: ${{ github.head_ref || github.ref_name }} \ No newline at end of file From a2221b289e489bb3d0e432a9bd3ee7f370ae47ed Mon Sep 17 00:00:00 2001 From: haochizzle Date: Fri, 9 Aug 2024 18:09:51 +0800 Subject: [PATCH 14/36] sdk overview update --- docs/docs/01-introduction/01-introduction.md | 2 +- docs/docs/01-introduction/02-key-features.md | 24 +++++++++---------- docs/docs/01-introduction/03-flow.md | 2 +- .../01-introduction/04-supported-networks.md | 2 -- docs/docs/03-sdk/01-overview.md | 17 +++++++------ .../src/components/HomepageFeatures/index.tsx | 2 +- 6 files changed, 25 insertions(+), 24 deletions(-) diff --git a/docs/docs/01-introduction/01-introduction.md b/docs/docs/01-introduction/01-introduction.md index 20e8819..eb83d92 100644 --- a/docs/docs/01-introduction/01-introduction.md +++ b/docs/docs/01-introduction/01-introduction.md @@ -10,7 +10,7 @@ Sprinter is a **fast, smooth, interoperable intent execution engine**. Our aim i ## What's Next -- If you're new to Sprinter, start with our [Getting Started Guide](../02-quick-start.md). +- If you're new to Sprinter, begin with [Quick Start](../02-quick-start.md). - Explore detailed examples and advanced usage in the [SDK Documentation](../03-sdk/01-overview.md). - Dive into the specifics of our API in the [API Documentation](../04-api/01-api-usage.md). diff --git a/docs/docs/01-introduction/02-key-features.md b/docs/docs/01-introduction/02-key-features.md index 6aaa47a..987fde4 100644 --- a/docs/docs/01-introduction/02-key-features.md +++ b/docs/docs/01-introduction/02-key-features.md @@ -4,35 +4,35 @@ title: Key Features sidebar_position: 2 --- -- [Fast](#fast) -- [Smooth](#smooth) -- [Interoperable](#interoperable) - Sprinter provides execution for chain abstracton providers by operating a large cluster of solvers that are designed to: - ⚖️ simplify cross-chain balance aggregation and transaction management - 🔀 automatically provide optimized execution paths by determining the fastest and cheapest paths for a transfer, regardless of layer - 🥰 provide the ultimate UX buff to users, applications, protocols, and wallets - ⚙️ be unopinionated about account types (EOAs or smart contract accounts) -The Sprinter solver engine creates capital efficiency across the cross-chain transaction flow by bearing equivocation risk for users and intent providers with our solvers. In effect, this optimizes the transaction supply chain for the user since we create the destination calldata. - -Just as the explosion of the EVM L2 ecosystem has brought about horizontal scalability for the entire Ethereum ecosystem, Sprinter amplifies this effect by facilitating movement of funds between all chains. - -## Fast +## 🏃‍♀️ Fast - **Extensive Route Search**: Our solvers explore a wide array of routes to access deeper liquidity pools. - **Execution Guarantee**: Ensures transaction execution through our advanced mechanism. - **Just-in-Time (JIT) Liquidity**: Provides JIT liquidity and capital fronting to facilitate transactions efficiently. -## Smooth +## 🥃 Smooth - **Flexible Account Compatibility**: Supports both externally owned accounts (EOA) and smart contract wallets. - **Minimized Slippage**: Quotes are derived from multiple pools across various intent protocols to minimize slippage. - **One-Click Solutions**: Enables seamless and straightforward one-click solutions for user convenience. -## Interoperable +## 🤝 Interoperable - **Multi-Protocol Integration**: Our solvers integrate with multiple protocols to enhance functionality. - **Account Type Agnostic**: Operates seamlessly regardless of account type. - **Wallet Implementation Agnostic**: Functions efficiently with various wallet implementations. -- **Flexible Capital Fronting**: Capable of fronting capital across different networks as needed. \ No newline at end of file +- **Flexible Capital Fronting**: Capable of fronting capital across different networks as needed. + +## 💳 Capital Efficient + +The Sprinter solver engine creates capital efficiency across the cross-chain transaction flow by bearing equivocation risk for users and intent providers. In effect, this optimizes the transaction supply chain for the user since we create the destination calldata. + +## ↔️ Horizontal Scaling + +Just as the explosion of the EVM L2 ecosystem has brought about horizontal scalability for the entire Ethereum ecosystem, Sprinter amplifies this effect by facilitating movement of funds between all chains. diff --git a/docs/docs/01-introduction/03-flow.md b/docs/docs/01-introduction/03-flow.md index a15c7f5..6b2d57e 100644 --- a/docs/docs/01-introduction/03-flow.md +++ b/docs/docs/01-introduction/03-flow.md @@ -1,6 +1,6 @@ --- id: flow -title: Sprinter Application Flow +title: Sprinter x Application Flow sidebar_position: 3 --- diff --git a/docs/docs/01-introduction/04-supported-networks.md b/docs/docs/01-introduction/04-supported-networks.md index a0449d9..4dc6705 100644 --- a/docs/docs/01-introduction/04-supported-networks.md +++ b/docs/docs/01-introduction/04-supported-networks.md @@ -20,5 +20,3 @@ Sprinter currently supports the following blockchain networks: - Polygon - Gnosis - Cronos - - \ No newline at end of file diff --git a/docs/docs/03-sdk/01-overview.md b/docs/docs/03-sdk/01-overview.md index f08831f..fc88130 100644 --- a/docs/docs/03-sdk/01-overview.md +++ b/docs/docs/03-sdk/01-overview.md @@ -4,13 +4,7 @@ sidebar_position: 1 # SDK Overview -The Sprinter SDK is a powerful tool designed to simplify interaction with multiple blockchain networks. It provides a unified interface for aggregating balances and optimizing cross-chain operations, making it easier to build decentralized applications (DApps). - -## Key Features - -- **Cross-Chain Balance Aggregation**: Consolidate balances from various blockchain networks. -- **Best Single-Hop Cross-Bridge Transactions**: Optimize transactions across different blockchains. -- **TypeScript Support**: Ensure type safety and a better development experience with TypeScript. +The Sprinter SDK simplifies interactions with multiple blockchain networks. It provides a unified interface for aggregating balances and optimizing cross-chain operations, making it easier to build decentralized applications (dApps). ## Installation @@ -28,6 +22,10 @@ yarn add @chainsafe/sprinter-sdk ## Basic Usage +:::info +If you would like to test this without custom front-end code, you can directly do so by adding `vite` as a package. You will then need to create an `index.html` file to serve as the entry way for the following script using `