Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sdk): update the SDK docs domain #316

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/tokamak/sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ npm install @tokamak-network/thanos-sdk

## Docs

You can find auto-generated API documentation over at [sdk.optimism.io](https://sdk.optimism.io).
You can find auto-generated API documentation over at [tokamak-network.github.io/thanos-sdk-docs](https://tokamak-network.github.io/thanos-sdk-docs/).

## Using the SDK

Expand All @@ -20,16 +20,16 @@ You can find auto-generated API documentation over at [sdk.optimism.io](https://
The [`CrossChainMessenger`](https://github.com/tokamak-network/tokamak-thanos/blob/main/packages/tokamak/sdk/src/cross-chain-messenger.ts) class simplifies the process of moving assets and data between Ethereum and Optimism.
You can use this class to, for example, initiate a withdrawal of ERC20 tokens from Optimism back to Ethereum, accurately track when the withdrawal is ready to be finalized on Ethereum, and execute the finalization transaction after the challenge period has elapsed.
The `CrossChainMessenger` can handle deposits and withdrawals of ETH and any ERC20-compatible token.
Detailed API descriptions can be found at [sdk.optimism.io](https://sdk.optimism.io/classes/crosschainmessenger).
Detailed API descriptions can be found at [tokamak-network.github.io/thanos-sdk-docs](https://tokamak-network.github.io/thanos-sdk-docs/classes/cross_chain_messenger.CrossChainMessenger.html).
The `CrossChainMessenger` automatically connects to all relevant contracts so complex configuration is not necessary.

### L2Provider and related utilities

The Optimism SDK includes [various utilities](https://github.com/tokamak-network/tokamak-thanos/blob/main/packages/tokamak/sdk/src/l2-provider.ts) for handling Optimism's [transaction fee model](https://community.optimism.io/docs/developers/build/transaction-fees/).
For instance, [`estimateTotalGasCost`](https://sdk.optimism.io/modules.html#estimateTotalGasCost) will estimate the total cost (in wei) to send at transaction on Optimism including both the L2 execution cost and the L1 data cost.
You can also use the [`asL2Provider`](https://sdk.optimism.io/modules.html#asL2Provider) function to wrap an ethers Provider object into an `L2Provider` which will have all of these helper functions attached.
For instance, [`estimateTotalGasCost`](https://tokamak-network.github.io/thanos-sdk-docs/functions/l2_provider.estimateL2GasCost.html) will estimate the total cost (in wei) to send at transaction on Optimism including both the L2 execution cost and the L1 data cost.
You can also use the [`asL2Provider`](https://tokamak-network.github.io/thanos-sdk-docs/functions/l2_provider.asL2Provider.html) function to wrap an ethers Provider object into an `L2Provider` which will have all of these helper functions attached.

### Other utilities

The SDK contains other useful helper functions and constants.
For a complete list, refer to the auto-generated [SDK documentation](https://sdk.optimism.io/)
For a complete list, refer to the auto-generated [SDK documentation](https://tokamak-network.github.io/thanos-sdk-docs/)
Loading