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

docs: Update Protocol Kit redirects and RemovedContentCallout #637

Merged
merged 2 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions components/RemovedContentCallout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { Callout } from 'nextra/components'
import { useEffect, useState } from 'react'

const RemovedContentCallout: React.FC<{
description: string
}> = ({ description }) => {
children: React.ReactNode
}> = ({ children }) => {
const [isContentRemoved, setIsContentRemoved] = useState<boolean>(false)

useEffect(() => {
Expand All @@ -14,7 +14,7 @@ const RemovedContentCallout: React.FC<{

if (!isContentRemoved) return

return <Callout type='warning'>{description}</Callout>
return <Callout type='warning'>{children}</Callout>
}

export default RemovedContentCallout
11 changes: 0 additions & 11 deletions pages/reference-sdk-protocol-kit/overview.md

This file was deleted.

17 changes: 17 additions & 0 deletions pages/reference-sdk-protocol-kit/overview.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import RemovedContentCallout from '../../components/RemovedContentCallout'

# Protocol Kit Reference

<RemovedContentCallout>
The `SafeFactory` class has been removed from the Protocol Kit and its functionality has been moved to the `Safe` class. Check the [Protocol Kit v5 migration guide](http://localhost:3000/sdk/protocol-kit/guides/migrate-to-v5) to get more details.
</RemovedContentCallout>

The [Protocol Kit](https://github.com/safe-global/safe-core-sdk/tree/main/packages/protocol-kit) facilitates the interaction with the Safe smart account contracts.

## Install dependencies

To add the Protocol Kit to your project, run:

```bash
yarn add @safe-global/protocol-kit
```
4 changes: 3 additions & 1 deletion pages/sdk/onramp.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import RemovedContentCallout from '../../components/RemovedContentCallout'

<RemovedContentCallout description="The Onramp Kit in the Safe{Core} SDK is no longer supported. We recommend integrating onramp providers directly into your application by following these guides." />
<RemovedContentCallout>
The Onramp Kit in the Safe\{Core\} SDK is no longer supported. We recommend integrating onramp providers directly into your application by following these guides.
</RemovedContentCallout>

# Onramp guides

Expand Down
4 changes: 3 additions & 1 deletion pages/sdk/onramp/monerium.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ import Image from 'next/image'
import MoneriumAddMoney from '../../../assets/monerium-sandbox-add-money.png'
import RemovedContentCallout from '../../../components/RemovedContentCallout'

<RemovedContentCallout description="The Onramp Kit in the Safe{Core} SDK is no longer supported; with that, neither is the MoneriumPack. We recommend integrating Monerium directly into your application by following this guide." />
<RemovedContentCallout>
The Onramp Kit in the Safe\{Core\} SDK is no longer supported; with that, neither is the `MoneriumPack`. We recommend integrating Monerium directly into your application by following this guide.
</RemovedContentCallout>

# Onramp with Monerium

Expand Down
4 changes: 3 additions & 1 deletion pages/sdk/onramp/stripe.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import KycAddress from '../../../assets/stripe-kyc-address.png'
import PaymentMethod from '../../../assets/stripe-kyc-payment-method.png'
import RemovedContentCallout from '../../../components/RemovedContentCallout'

<RemovedContentCallout description="The Onramp Kit in the Safe{Core} SDK is no longer supported; with that, neither is the StripePack. We recommend integrating Stripe directly into your application by following this guide." />
<RemovedContentCallout>
The Onramp Kit in the Safe\{Core\} SDK is no longer supported; with that, neither is the `StripePack`. We recommend integrating Stripe directly into your application by following this guide.
</RemovedContentCallout>

# Onramp with Stripe

Expand Down
2 changes: 1 addition & 1 deletion pages/sdk/protocol-kit/guides/execute-transactions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

In this quickstart guide, you will create a 2 of 3 multi-sig Safe and propose and execute a transaction to send some ETH out of this Safe.

To find more details and configuration options for available methods, see the [Protocol Kit reference](../../../reference-sdk-protocol-kit/overview.md).
To find more details and configuration options for available methods, see the [Protocol Kit reference](../../../reference-sdk-protocol-kit/overview.mdx).

### Prerequisites

Expand Down
4 changes: 3 additions & 1 deletion pages/sdk/protocol-kit/guides/multichain-safe-deployment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { Steps } from 'nextra/components'

This guide will teach you how to replicate a Safe address across different chains using the Protocol Kit. This process includes initializing the Protocol Kit, configuring the Safes to deploy, predicting its address on different chains, and executing the deployment transactions.

For more detailed information, see the [Protocol Kit Reference](../../../reference-sdk-protocol-kit/overview.mdx).

## Prerequisites

- [Node.js and npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
Expand Down Expand Up @@ -44,7 +46,7 @@ pnpm add @safe-global/protocol-kit viem

### Create a signer

You need a signer to instantiate the Protocol Kit. This example uses a private key to obtain a signer, but other [EIP-1193](https://eips.ethereum.org/EIPS/eip-1193) compatible signers are also supported. For detailed information about signers, please refer to the [Protocol Kit reference](../../../reference-sdk-protocol-kit/overview.md).
You need a signer to instantiate the Protocol Kit. This example uses a private key to obtain a signer, but other [EIP-1193](https://eips.ethereum.org/EIPS/eip-1193) compatible signers are also supported. For detailed information about signers, please refer to the [Protocol Kit reference](../../../reference-sdk-protocol-kit/overview.mdx).

{/* <!-- vale off --> */}

Expand Down
2 changes: 1 addition & 1 deletion pages/sdk/protocol-kit/guides/safe-deployment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pnpm add @safe-global/protocol-kit viem

### Create a signer

You need a signer to instantiate the Protocol Kit. This example uses a private key to obtain a signer, but [EIP-1193](https://eips.ethereum.org/EIPS/eip-1193) compatible signers are also supported. For detailed information about signers, please refer to the [Protocol Kit reference](../../../reference-sdk-protocol-kit/overview.md).
You need a signer to instantiate the Protocol Kit. This example uses a private key to obtain a signer, but [EIP-1193](https://eips.ethereum.org/EIPS/eip-1193) compatible signers are also supported. For detailed information about signers, please refer to the [Protocol Kit reference](../../../reference-sdk-protocol-kit/overview.mdx).

{/* <!-- vale off --> */}

Expand Down
4 changes: 3 additions & 1 deletion pages/sdk/signers.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import RemovedContentCallout from '../../components/RemovedContentCallout'

<RemovedContentCallout description="The Auth Kit in the Safe{Core} SDK is no longer supported. We recommend integrating Web3 authentication providers directly into your application by following these guides." />
<RemovedContentCallout>
The Auth Kit in the Safe\{Core\} SDK is no longer supported. We recommend integrating Web3 authentication providers directly into your application by following these guides.
</RemovedContentCallout>

# Signers

Expand Down
26 changes: 8 additions & 18 deletions redirects.json
Original file line number Diff line number Diff line change
Expand Up @@ -321,21 +321,21 @@
},
{
"source": "/sdk-protocol-kit/reference",
"destination": "/sdk/protocol-kit/reference",
"destination": "/reference-sdk-protocol-kit/overview",
"permanent": true
},
{
"source": "/safe-core-aa-sdk/protocol-kit/reference/v1",
"destination": "/sdk/protocol-kit/guides/migrate-to-v1",
"source": "/sdk-protocol-kit/reference/safe",
"destination": "/reference-sdk-protocol-kit/overview",
"permanent": true
},
{
"source": "/sdk/protocol-kit/reference/migrate-to-v1",
"destination": "/sdk/protocol-kit/guides/migrate-to-v1",
"source": "/sdk-protocol-kit/reference/safe-factory",
"destination": "/reference-sdk-protocol-kit?removed=true",
"permanent": true
},
{
"source": "/sdk-protocol-kit/reference/migrating-to-v1",
"source": "/safe-core-aa-sdk/protocol-kit/reference/v1",
"destination": "/sdk/protocol-kit/guides/migrate-to-v1",
"permanent": true
},
Expand All @@ -345,12 +345,12 @@
"permanent": true
},
{
"source": "/sdk/protocol-kit/reference/migrating-to-v1",
"source": "/sdk-protocol-kit/reference/migrating-to-v1",
"destination": "/sdk/protocol-kit/guides/migrate-to-v1",
"permanent": true
},
{
"source": "/sdk/protocol-kit/reference/migrate-to-v1",
"source": "/sdk/protocol-kit/reference/migrating-to-v1",
"destination": "/sdk/protocol-kit/guides/migrate-to-v1",
"permanent": true
},
Expand All @@ -369,21 +369,11 @@
"destination": "/sdk/protocol-kit/guides/migrate-to-v2",
"permanent": true
},
{
"source": "/sdk/protocol-kit/reference/migrate-to-v2",
"destination": "/sdk/protocol-kit/guides/migrate-to-v2",
"permanent": true
},
{
"source": "/sdk/protocol-kit/reference/migrating-to-v2",
"destination": "/sdk/protocol-kit/guides/migrate-to-v2",
"permanent": true
},
{
"source": "/sdk/protocol-kit/reference/migrate-to-v2",
"destination": "/sdk/protocol-kit/guides/migrate-to-v2",
"permanent": true
},
{
"source": "/safe-core-aa-sdk/onramp-kit",
"destination": "/sdk/onramp?removed=true",
Expand Down
Loading