diff --git a/docs/resources/index.mdx b/docs/resources/index.mdx index c86c64e3..9f612074 100644 --- a/docs/resources/index.mdx +++ b/docs/resources/index.mdx @@ -20,7 +20,7 @@ Here is an up-to-date list of software and repositories to help you build on [SU - [`suave-std` Solidity Libraries](/tutorials/suave-standard-library) - [Forge](/resources/forge) - [Golang SDK](/resources/golang-sdk) -- [`suave-viem` Typescript SDK](/resources/typescript-sdk) +- [`suave-viem` TypeScript SDK](/resources/TypeScript-sdk) **Docs, examples and code:** @@ -28,7 +28,7 @@ Here is an up-to-date list of software and repositories to help you build on [SU - [SUAVE Rigil Specs](/technical/specs/rigil) - [suave-geth](https://github.com/flashbots/suave-geth) -## Community +## Community Here is an up-to-date list of software built by the SUAVE community: diff --git a/docs/resources/typescript-sdk.mdx b/docs/resources/typescript-sdk.mdx index 2ae07849..5d683c6f 100644 --- a/docs/resources/typescript-sdk.mdx +++ b/docs/resources/typescript-sdk.mdx @@ -1,12 +1,12 @@ --- -title: Typescript SDK -description: An overview of the Typescript SDK (suave-viem) +title: TypeScript SDK +description: An overview of the TypeScript SDK (suave-viem) --- import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -:::info +:::info [SUAVE-Viem](https://github.com/flashbots/suave-viem) is a fork of [viem](https://github.com/wagmi-dev/viem) that will eventually be upstreamed but is currently still in a dynamic state. @@ -14,13 +14,13 @@ Sending Confidential Compute Requests works slightly differently, but most other ::: -This page describes how to work with the SUAVE-viem typescript SDK. The SDK simplifies interaction with the SUAVE Chain and provides easy-to-use functions to send transactions and query data. Below, you'll find steps on how to instantiate the library, symlink, and perform some basic actions. +This page describes how to work with the SUAVE-viem TypeScript SDK. The SDK simplifies interaction with the SUAVE Chain and provides easy-to-use functions to send transactions and query data. Below, you'll find steps on how to instantiate the library, symlink, and perform some basic actions. ## Installation The [`@flashbots/suave-viem`](https://www.npmjs.com/package/@flashbots/suave-viem) package is available on NPM, and can be installed with any NPM-based package manager, such as **npm**, **yarn**, or **bun**. -:::warning +:::warning Alpha Release Version @@ -230,7 +230,7 @@ const ccr: TransactionRequestSuave = { `confidentialInputs` is a field to store information that should be kept private during computation, and the data field is the typical calldata required to interact with a dapp. -If you prefer typescript, you can see how to craft your own CCRs in the [examples directory of suave-viem](https://github.com/flashbots/suave-viem/blob/main/examples/suave-web-demo/src/suave.ts). +If you prefer TypeScript, you can see how to craft your own CCRs in the [examples directory of suave-viem](https://github.com/flashbots/suave-viem/blob/main/examples/suave-web-demo/src/suave.ts). ::: diff --git a/docs/technical b/docs/technical index 95f36493..738a346d 160000 --- a/docs/technical +++ b/docs/technical @@ -1 +1 @@ -Subproject commit 95f36493ec344fda29976ea5a72b8d8c17bd7333 +Subproject commit 738a346d8f1a6ae58cadc13d22187be3f2b204f8 diff --git a/docs/tutorials/build-suapps.mdx b/docs/tutorials/build-suapps.mdx index e8e08051..f769d1ec 100644 --- a/docs/tutorials/build-suapps.mdx +++ b/docs/tutorials/build-suapps.mdx @@ -6,7 +6,7 @@ keywords: - build - suave - create - - typescript + - TypeScript - viem --- @@ -14,7 +14,7 @@ This tutorial will show you how to build a SUAPP using [`suave-viem`](https://ww :::info -There are two different templates you can use for your SUAPP. One with minimal, typescript-only dependencies; and one which uses Next. +There are two different templates you can use for your SUAPP. One with minimal, TypeScript-only dependencies; and one which uses Next. ::: @@ -108,12 +108,12 @@ bun dev This template uses the same MEV-Share example contract we worked with using the [Golang SDK in the previous tutorial](/tutorials/send-transactions). -> _If you're struggling with any of the above, you can also find this pure typescript template as a standalone repo [here](https://github.com/andytudhope/build-a-suapp-ts)._ +> _If you're struggling with any of the above, you can also find this pure TypeScript template as a standalone repo [here](https://github.com/andytudhope/build-a-suapp-ts)._ ## Next.js Example -This template comes with a more extensive frontend framework, which uses Next (in typescript) and therefore depends on React. You can get it running by first cloning the repo and installing its dependencies. +This template comes with a more extensive frontend framework, which uses Next (in TypeScript) and therefore depends on React. You can get it running by first cloning the repo and installing its dependencies. Make sure you have previously built and symlinked suave-viem for this to work: @@ -135,7 +135,7 @@ Deploy the compiled contracts from the root directory (you need to have [SUAVE r ```bash chmod +x packages/forge/deploy -yarn contracts:deploy +yarn contracts:deploy ``` You can start the frontend with: diff --git a/docs/tutorials/confidential-compute-requests.mdx b/docs/tutorials/confidential-compute-requests.mdx index 5f0559d0..e20d7667 100644 --- a/docs/tutorials/confidential-compute-requests.mdx +++ b/docs/tutorials/confidential-compute-requests.mdx @@ -10,7 +10,7 @@ keywords: :::info -There are a number of different ways to work with SUAVE and to craft Confidential Compute Requests (CCRs). We'll discuss how to use both the Typescript and Golang SDKs in this tutorial. +There are a number of different ways to work with SUAVE and to craft Confidential Compute Requests (CCRs). We'll discuss how to use both the TypeScript and Golang SDKs in this tutorial. ::: @@ -21,7 +21,7 @@ There are a number of different ways to work with SUAVE and to craft Confidentia
-
Typescript
+
TypeScript
For web developers
@@ -52,17 +52,17 @@ There are a number of different ways to work with SUAVE and to craft Confidentia -## Typescript +## TypeScript -The [two templates from the previous tutorial](/tutorials/build-suapps) illustrate different ways of using CCRs on SUAVE. +The [two templates from the previous tutorial](/tutorials/build-suapps) illustrate different ways of using CCRs on SUAVE. The **Next** template uses a basic contract to demonstrate the absolute basics of how CCRs work and how to use them as a developer building SUAPPs. -The **Typescript** template will lead you through how to sign a transaction on another domain (Goerli in this case), and then submit that signed transaction in the data of your CCR on SUAVE. +The **TypeScript** template will lead you through how to sign a transaction on another domain (Goerli in this case), and then submit that signed transaction in the data of your CCR on SUAVE. ### Callbacks -Let's start in the [Next template](https://github.com/andytudhope/build-a-suapp-next-ts/) and look at how CCRs work and how to use them. +Let's start in the [Next template](https://github.com/andytudhope/build-a-suapp-next-ts/) and look at how CCRs work and how to use them. [`OnChainState.sol`](https://github.com/andytudhope/build-a-suapp-next-ts/blob/main/packages/forge/src/OnChainState.sol) demonstrates that any CCR which tries to change state directly will revert. Rather, you need to use a callback to a different function that does change state in order to ensure that data sent in a CCR remains confidential: @@ -126,13 +126,13 @@ There are a few key points to understand: ### CCRs with data -What happens when we do actually want to send data in our CCR? +What happens when we do actually want to send data in our CCR? -The [Typescript template](https://github.com/flashbots/suave-viem/tree/main/examples/suave-web-demo) demonstrates how to do this by signing transactions on Goerli that you wish to be processed by Kettles on SUAVE. +The [TypeScript template](https://github.com/flashbots/suave-viem/tree/main/examples/suave-web-demo) demonstrates how to do this by signing transactions on Goerli that you wish to be processed by Kettles on SUAVE. In this case, we need to: -1. Craft a transaction on Goerli and sign it. +1. Craft a transaction on Goerli and sign it. 2. Append relevant details like the `decryptionCondition`, `kettleAddress`, `contract` and `chainId`. 3. Use a helper function like `toConfidentialRequest` to 1. place our signed transaction in `confidentialInputs` and @@ -177,7 +177,7 @@ const sendDataRecord = async (suaveWallet: any) => { } ``` -Here, we use the convenient `toConfidentialRequest()` request method once we have the signed transaction, rather than crafting it manually ourselves and setting the transaction type as we did in the Next template. +Here, we use the convenient `toConfidentialRequest()` request method once we have the signed transaction, rather than crafting it manually ourselves and setting the transaction type as we did in the Next template. This should give you enough information to start crafting your own CCRs and learning how to leverage the benefits of credible, confidential computation. @@ -191,7 +191,7 @@ The [**SUAPP Examples repo**](https://github.com/flashbots/suapp-examples) uses Let's look at the [private order-flow auction example](https://github.com/flashbots/suapp-examples/blob/main/examples/app-ofa-private/main.go) to understand how to use the Golang SDK to craft more complex kinds of CCRs. -The flow of this example is similar to the Typescript MEVShare demo directly above. However, we'll use it to demonstrate a full e2e flow with CCRs: +The flow of this example is similar to the TypeScript MEVShare demo directly above. However, we'll use it to demonstrate a full e2e flow with CCRs: 1. Deploy the OFA contract. 2. Instantiate two new accounts and fund them. diff --git a/docs/tutorials/send-transactions.mdx b/docs/tutorials/send-transactions.mdx index 1edbcfd3..75b4832f 100644 --- a/docs/tutorials/send-transactions.mdx +++ b/docs/tutorials/send-transactions.mdx @@ -10,7 +10,7 @@ keywords: :::info -Sending transactions requires that you use either the Golang or Typescript SDKs we have made available. Confidential Compute Requests (CCRs) are not EIP-1193 compatible so signing CCRs from browser wallets requires some workarounds. +Sending transactions requires that you use either the Golang or TypeScript SDKs we have made available. Confidential Compute Requests (CCRs) are not EIP-1193 compatible so signing CCRs from browser wallets requires some workarounds. :::