diff --git a/docs/docs/api/assets.md b/docs/docs/api/assets.md index 735c94f..89188fb 100644 --- a/docs/docs/api/assets.md +++ b/docs/docs/api/assets.md @@ -24,7 +24,7 @@ The response is a JSON object containing an array of fungible token objects. ```shell curl -X 'GET' \ - 'https://gopher.test.buildwithsygma.com/assets/fungible' \ + 'https://api.sprinter.buildwithsygma.com/assets/fungible' \ -H 'accept: application/json' ``` @@ -91,7 +91,7 @@ The response is a JSON object containing the details of the specified token. ```shell curl -X 'GET' \ - 'https://gopher.test.buildwithsygma.com/assets/fungible/usdc' \ + 'https://api.sprinter.buildwithsygma.com/assets/fungible/usdc' \ -H 'accept: application/json' ``` @@ -144,7 +144,7 @@ The response is a JSON object containing an array of fungible token objects for ```shell curl -X 'GET' \ - 'https://gopher.test.buildwithsygma.com/networks/1/assets/fungible' \ + 'https://api.sprinter.buildwithsygma.com/networks/1/assets/fungible' \ -H 'accept: application/json' ``` diff --git a/docs/docs/api/get-started.md b/docs/docs/api/get-started.md index 4ce8c15..ac78282 100644 --- a/docs/docs/api/get-started.md +++ b/docs/docs/api/get-started.md @@ -6,9 +6,9 @@ sidebar_position: 1 ## API Usage -If you prefer using API calls directly or due to limitations of your environment, you can use the Gopher API. This guide provides an overview of the available endpoints and examples of how to interact with them. +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. -You can use the Swagger documentation available at [Gopher Swagger API](https://gopher.test.buildwithsygma.com/swagger/index.html) for more detailed information. +You can use the Swagger documentation available at [Sprinter Swagger API](https://api.sprinter.buildwithsygma.com/swagger/index.html) for more detailed information. ### Example @@ -16,7 +16,7 @@ Example of getting a list of supported networks: ```shell curl -X 'GET' \ - 'https://gopher.test.buildwithsygma.com/networks' \ + 'https://api.sprinter.buildwithsygma.com/networks' \ -H 'accept: application/json' ``` @@ -34,4 +34,4 @@ For more detailed information about each endpoint, please refer to the specific - Token aggregation - Token aggregation with contract call -Explore each section to understand how to make the most out of the Gopher API. +Explore each section to understand how to make the most out of the Sprinter API. diff --git a/docs/docs/api/networks.md b/docs/docs/api/networks.md index 12e9f5d..e4b8ac1 100644 --- a/docs/docs/api/networks.md +++ b/docs/docs/api/networks.md @@ -24,7 +24,7 @@ The response is a JSON object containing an array of network objects. ```shell curl -X 'GET' \ - 'https://gopher.test.buildwithsygma.com/networks' \ + 'https://api.sprinter.buildwithsygma.com/networks' \ -H 'accept: application/json' ``` diff --git a/docs/docs/api/solutions.md b/docs/docs/api/solutions.md index 74bff81..f532981 100644 --- a/docs/docs/api/solutions.md +++ b/docs/docs/api/solutions.md @@ -4,7 +4,7 @@ sidebar_position: 5 # Solutions -This section explains how to get solutions for specific actions using the Gopher API. +This section explains how to get solutions for specific actions using the Sprinter API. ## GET - /solutions/aggregation @@ -24,7 +24,7 @@ The response is a JSON object containing an array of solutions. ```shell curl -X 'GET' \ - 'https://gopher.test.buildwithsygma.com/solutions/aggregation' \ + 'https://api.sprinter.buildwithsygma.com/solutions/aggregation' \ -H 'accept: application/json' ``` @@ -115,7 +115,7 @@ The request body should be a JSON object containing the following fields: ```shell curl -X 'POST' \ - 'https://gopher.test.buildwithsygma.com/solutions/aggregation' \ + 'https://api.sprinter.buildwithsygma.com/solutions/aggregation' \ -H 'accept: application/json' \ -H 'Content-Type: application/json' \ -d '{ diff --git a/docs/docs/api/user-assets.md b/docs/docs/api/user-assets.md index 3e1648d..4be2dd0 100644 --- a/docs/docs/api/user-assets.md +++ b/docs/docs/api/user-assets.md @@ -29,7 +29,7 @@ The response is a JSON object containing an array of fungible token balance obje ```shell curl -X 'GET' \ - 'https://gopher.test.buildwithsygma.com/accounts/0x123.../assets/fungible/usdc' \ + 'https://api.sprinter.buildwithsygma.com/accounts/0x123.../assets/fungible/usdc' \ -H 'accept: application/json' ``` diff --git a/docs/docs/get-started.md b/docs/docs/get-started.md index ac1ce74..d432dbc 100644 --- a/docs/docs/get-started.md +++ b/docs/docs/get-started.md @@ -4,35 +4,35 @@ sidebar_position: 2 # Getting Started -Welcome to the Gopher SDK! This guide will introduce you to the application flow of Gopher, explaining how it integrates with your application to manage cross-chain balances and transactions. +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. -## Gopher Application Flow +## Sprinter Application Flow -The Gopher SDK is designed to streamline the process of interacting with multiple blockchain networks. Here's an overview of the typical flow of a Gopher-integrated application: +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 Gopher, 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. +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, Gopher can optionally aggregate the user's balances across multiple blockchains. This involves fetching data from different networks and consolidating it into a single view. +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. Gopher finds the best single-hop cross-bridge transaction to optimize the process. +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. Gopher provides the best options for the transaction, but the actual execution and following the transaction status are handled by the 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. Gopher ensures that it provides accurate data and options, but the DApp is responsible for handling any errors that may arise during the transaction process. +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 Gopher Flow +## Diagram of the Sprinter Flow -Below is a simplified diagram illustrating the Gopher application flow: +Below is a simplified diagram illustrating the Sprinter application flow: ```plaintext +------------------------+ @@ -62,10 +62,10 @@ Below is a simplified diagram illustrating the Gopher application flow: ## Further Reading -Now that you understand the Gopher application flow, here are some next steps to dive deeper into specific areas: +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 Gopher for direct integration. -- **[Introduction to Gopher SDK](introduction.md)**: Get an overview of the Gopher SDK and its key features. +- **[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. -We hope this guide provides a clear understanding of the Gopher application flow. If you have any questions or need further assistance, feel free to reach out. Happy coding! +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/introduction.md b/docs/docs/introduction.md index c057940..6d98203 100644 --- a/docs/docs/introduction.md +++ b/docs/docs/introduction.md @@ -4,36 +4,36 @@ sidebar_position: 1 # Introduction -Welcome to the Gopher SDK documentation! The Gopher 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. +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 Gopher SDK: +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 Gopher 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 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 { Gopher } from '@chainsafe/gopher-sdk'; +import { Sprinter } from '@chainsafe/sprinter-sdk'; -const gopher = new Gopher(window.ethereum); +const sprinter = new Sprinter(window.ethereum); -gopher.getUserBalances().then(console.log); +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 Gopher. +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 @@ -54,9 +54,9 @@ For a comprehensive list of available endpoints and how to use them, check out t ## Next Steps -- If you're new to Gopher SDK, start with our [Getting Started Guide](get-started.md). -- For an in-depth understanding, read the [Introduction to Gopher SDK](introduction.md). +- 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 Gopher SDK easy to use and integrate into your projects. Happy coding! +We hope you find the Sprinter SDK easy to use and integrate into your projects. Happy coding! diff --git a/docs/docs/sdk/advanced-usage.md b/docs/docs/sdk/advanced-usage.md index 9ff210a..33e530c 100644 --- a/docs/docs/sdk/advanced-usage.md +++ b/docs/docs/sdk/advanced-usage.md @@ -4,7 +4,7 @@ sidebar_position: 2 # Advanced Usage -This section explores advanced features and best practices for using the Gopher SDK in your decentralized applications (DApps). +This section explores advanced features and best practices for using the Sprinter SDK in your decentralized applications (DApps). ## Handling Errors @@ -13,7 +13,7 @@ The DApp is responsible for handling errors that occur during the transaction pr ### Example ```typescript -gopher.getUserBalances() +sprinter.getUserBalances() .then(balances => { console.log('User balances:', balances); }) @@ -28,12 +28,12 @@ gopher.getUserBalances() ## Customizing Requests -The Gopher SDK allows you to customize requests to suit your application's needs. Here’s how to provide additional options when fetching solutions. +The Sprinter SDK allows you to customize requests to suit your application's needs. Here’s how to provide additional options when fetching solutions. ### Example ```typescript -gopher.getSolution({ +sprinter.getSolution({ token: "USDC", destinationChain: 42161, // Destination chain ID amount: "1000000000" // Amount in the smallest unit (e.g., wei) @@ -48,24 +48,24 @@ gopher.getSolution({ ## Integrating with Other Libraries -You can integrate the Gopher SDK with other libraries and tools in your DApp to enhance functionality. +You can integrate the Sprinter SDK with other libraries and tools in your DApp to enhance functionality. ### Example with Web3.js v4 ```typescript -import { Gopher } from '@chainsafe/gopher-sdk'; +import { Sprinter } from '@chainsafe/sprinter-sdk'; import Web3 from 'web3'; async function integrateWithWeb3() { const web3 = new Web3(window.ethereum); const accounts = await web3.eth.requestAccounts(); - const gopher = new Gopher(window.ethereum); + const sprinter = new Sprinter(window.ethereum); - const balances = await gopher.getUserBalances(); + const balances = await sprinter.getUserBalances(); console.log('User balances:', balances); - const solution = await gopher.getSolution({ + const solution = await sprinter.getSolution({ token: "USDC", destinationChain: 42161, amount: "1000000000" @@ -92,11 +92,11 @@ integrateWithWeb3().catch(console.error); ### Explanation - **Web3.js v4**: A library for interacting with the Ethereum blockchain, used here to manage accounts and send transactions. -- **solution[0].transaction**: The transaction object provided by Gopher's solution that is used to execute the transaction. +- **solution[0].transaction**: The transaction object provided by Sprinter's solution that is used to execute the transaction. ## Best Practices -Follow these best practices to ensure smooth and efficient integration of the Gopher SDK in your DApp: +Follow these best practices to ensure smooth and efficient integration of the Sprinter SDK in your DApp: - **Error Handling**: Always implement comprehensive error handling to manage issues gracefully. - **User Experience**: Provide clear feedback to users about the status of their transactions and any errors that occur. diff --git a/docs/docs/sdk/api-functions.md b/docs/docs/sdk/api-functions.md index 2706dbe..856e53a 100644 --- a/docs/docs/sdk/api-functions.md +++ b/docs/docs/sdk/api-functions.md @@ -4,7 +4,7 @@ sidebar_position: 4 # API Functions Reference -This section provides detailed information about the API functions available in the Gopher SDK. Use this reference to understand how to utilize the API functions in your decentralized applications (DApps). +This section provides detailed information about the API functions available in the Sprinter SDK. Use this reference to understand how to utilize the API functions in your decentralized applications (DApps). ## API Functions @@ -19,7 +19,7 @@ Sets the base URL for the API. #### Example ```typescript -setBaseUrl("https://new-api-url.com/"); +setBaseUrl("https://test.api.sprinter.buildwithsygma.com/"); ``` ### `getSupportedChains(): Promise` @@ -263,6 +263,6 @@ Represents an amount in both native and USD values. ## Next Steps -- **[Gopher Class](class-reference.md)**: Get detailed information about the Gopher class provided by the SDK. +- **[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/class-reference.md b/docs/docs/sdk/class-reference.md index 65eb73b..c67ede4 100644 --- a/docs/docs/sdk/class-reference.md +++ b/docs/docs/sdk/class-reference.md @@ -2,13 +2,13 @@ sidebar_position: 3 --- -# Gopher Class Reference +# Sprinter Class Reference -This section provides detailed information about the `Gopher` class available in the Gopher SDK. Use this reference to understand how to utilize the `Gopher` class in your decentralized applications (DApps). +This section provides detailed information about the `Sprinter` class available in the Sprinter SDK. Use this reference to understand how to utilize the `Sprinter` class in your decentralized applications (DApps). -## Gopher Class +## Sprinter Class -The main class provided by the Gopher SDK. It includes methods for interacting with multiple blockchain networks. +The main class provided by the Sprinter SDK. It includes methods for interacting with multiple blockchain networks. ### `constructor(provider: EIP1193Provider)` @@ -21,7 +21,7 @@ Initializes the SDK with the given Ethereum provider. #### Example ```typescript -const gopher = new Gopher(window.ethereum); +const sprinter = new Sprinter(window.ethereum); ``` ### `getAvailableTokens(): Promise` @@ -35,7 +35,7 @@ Fetches the available fungible tokens across supported blockchain networks. #### Example ```typescript -gopher.getAvailableTokens().then(tokens => { +sprinter.getAvailableTokens().then(tokens => { console.log('Available tokens:', tokens); }); ``` @@ -51,7 +51,7 @@ Fetches the supported blockchain networks. #### Example ```typescript -gopher.getAvailableChains().then(chains => { +sprinter.getAvailableChains().then(chains => { console.log('Supported chains:', chains); }); ``` @@ -71,7 +71,7 @@ Fetches the user's balances for specified tokens across multiple blockchains. If #### Example ```typescript -gopher.getUserBalances().then(balances => { +sprinter.getUserBalances().then(balances => { console.log('User balances:', balances); }); ``` @@ -97,7 +97,7 @@ Retrieves the optimal solution for managing cross-chain transactions based on th #### Example ```typescript -gopher.getSolution({ +sprinter.getSolution({ token: "USDC", destinationChain: 42161, // Destination chain ID amount: 1000000000 // Amount in the smallest unit (e.g., wei) diff --git a/docs/docs/sdk/overview.md b/docs/docs/sdk/overview.md index 38f2c3f..6c3c0ce 100644 --- a/docs/docs/sdk/overview.md +++ b/docs/docs/sdk/overview.md @@ -4,7 +4,7 @@ sidebar_position: 1 # SDK Overview -The Gopher 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). +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 @@ -14,34 +14,34 @@ The Gopher SDK is a powerful tool designed to simplify interaction with multiple ## Installation -To install the Gopher SDK, run the following command in your project directory: +To install the Sprinter SDK, run the following command in your project directory: ```bash -npm install @chainsafe/gopher-sdk +npm install @chainsafe/sprinter-sdk ``` Or if you prefer using yarn: ```bash -yarn add @chainsafe/gopher-sdk +yarn add @chainsafe/sprinter-sdk ``` ## Basic Usage Here's a quick example to get you started with the SDK: -### 1. Import the Gopher SDK +### 1. Import the Sprinter SDK ```typescript -import { Gopher } from '@chainsafe/gopher-sdk'; +import { Sprinter } from '@chainsafe/sprinter-sdk'; ``` -### 2. Initialize the Gopher SDK +### 2. Initialize the Sprinter SDK -To initialize the SDK, create a new instance of the `Gopher` class with an Ethereum provider: +To initialize the SDK, create a new instance of the `Sprinter` class with an Ethereum provider: ```typescript -const gopher = new Gopher(window.ethereum); +const sprinter = new Sprinter(window.ethereum); ``` ### 3. Fetch User Balances @@ -49,7 +49,7 @@ const gopher = new Gopher(window.ethereum); Once initialized, you can fetch the user's balances across multiple blockchains: ```typescript -gopher.getUserBalances().then(console.log); +sprinter.getUserBalances().then(console.log); ``` ### 4. Get Solution @@ -57,7 +57,7 @@ gopher.getUserBalances().then(console.log); Retrieve the optimal solution for managing cross-chain transactions: ```typescript -gopher.getSolution({ +sprinter.getSolution({ token: "USDC", destinationChain: 42161, // Destination chain ID amount: "1000000000" // Amount in the smallest unit (e.g., wei) @@ -69,16 +69,16 @@ gopher.getSolution({ Here's a more detailed example that combines all the basic operations: ```typescript -import { Gopher } from '@chainsafe/gopher-sdk'; +import { Sprinter } from '@chainsafe/sprinter-sdk'; -const gopher = new Gopher(window.ethereum); +const sprinter = new Sprinter(window.ethereum); // Fetch user balances -gopher.getUserBalances().then(balances => { +sprinter.getUserBalances().then(balances => { console.log('User balances:', balances); // Get solution for transactions - return gopher.getSolution({ + return sprinter.getSolution({ token: "USDC", destinationChain: 42161, // Destination chain ID amount: "1000000000" // Amount in the smallest unit (e.g., wei) @@ -96,7 +96,7 @@ gopher.getUserBalances().then(balances => { ## Next Steps -- **[Core Concepts](../get-started.md)**: Understand the fundamental concepts and operations of the Gopher SDK. +- **[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. diff --git a/docs/docusaurus.config.ts b/docs/docusaurus.config.ts index fdb28e1..2175f3a 100644 --- a/docs/docusaurus.config.ts +++ b/docs/docusaurus.config.ts @@ -3,20 +3,20 @@ import type {Config} from '@docusaurus/types'; import type * as Preset from '@docusaurus/preset-classic'; const config: Config = { - title: 'Gopher Docs', - tagline: 'Dinosaurs are cool', + title: 'Sprinter Docs', + tagline: 'Sprinter is soo cool', favicon: 'img/favicon.ico', // Set the production url of your site here - url: 'https://your-docusaurus-site.example.com', + url: 'https://docs.sprinter.buildwithsygma.com/', // Set the // pathname under which your site is served // For GitHub pages deployment, it is often '//' baseUrl: '/', // GitHub pages deployment config. // If you aren't using GitHub pages, you don't need these. - organizationName: 'TODO', // Usually your GitHub org/user name. - projectName: 'gopher-ts', // Usually your repo name. + organizationName: 'ChainSafe', // Usually your GitHub org/user name. + projectName: 'sprinter-ts', // Usually your repo name. onBrokenLinks: 'throw', onBrokenMarkdownLinks: 'warn', @@ -49,7 +49,7 @@ const config: Config = { // Replace with your project's social card image: 'img/docusaurus-social-card.jpg', navbar: { - title: 'My Site', + title: 'Sprinter', logo: { alt: 'My Site Logo', src: 'img/logo.svg', @@ -62,7 +62,12 @@ const config: Config = { label: 'Docs', }, { - href: 'https://github.com/facebook/docusaurus', + href: 'https://poc.sprinter.buildwithsygma.com/', + label: 'POC', + position: 'right', + }, + { + href: 'https://github.com/ChainSafe/sprinter-ts', label: 'GitHub', position: 'right', }, @@ -107,7 +112,7 @@ const config: Config = { ], }, ], - copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`, + copyright: `Copyright © ${new Date().getFullYear()} Sprinter, Inc. Built with Docusaurus.`, }, prism: { theme: prismThemes.github, diff --git a/docs/src/pages/index.tsx b/docs/src/pages/index.tsx index a7df48e..2f8a06c 100644 --- a/docs/src/pages/index.tsx +++ b/docs/src/pages/index.tsx @@ -27,7 +27,7 @@ function HomepageHeader() {
+ to="https://poc.sprinter.buildwithsygma.com/"> Proof of Concept