Skip to content

Commit

Permalink
fix: broken links to SDK repo and remove references to guide (#488)
Browse files Browse the repository at this point in the history
* fix: broken links to Safe Core SDK repo

* chore: remove references to repository guide

* Apply suggestions from code review

---------

Co-authored-by: Germán Martínez <[email protected]>
  • Loading branch information
dasanra and germartinez authored May 29, 2024
1 parent efdd447 commit 3e99e9f
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 41 deletions.
6 changes: 3 additions & 3 deletions pages/sdk/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"title": "Safe{Core} SDK"
},
"overview": "Overview",
"auth-kit": "Auth Kit",
"protocol-kit": "Protocol Kit",
"onramp-kit": "Onramp Kit",
"api-kit": "API Kit",
"relay-kit": "Relay Kit",
"api-kit": "API Kit"
"auth-kit": "Auth Kit",
"onramp-kit": "Onramp Kit"
}
8 changes: 5 additions & 3 deletions pages/sdk/api-kit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The [API Kit](https://github.com/safe-global/safe-core-sdk/tree/main/packages/ap

In this guide we will see how to propose transactions to the service and collect the signatures from the owners so they become executable.

For more detailed information, see the guide [Integrating the Protocol Kit and API Kit](https://github.com/safe-global/safe-core-sdk/blob/main/guides/integrating-the-safe-core-sdk.md) and the [API Kit Reference](./api-kit/reference.md).
For more detailed information, see the [API Kit Reference](./api-kit/reference.md).

## Prerequisites

Expand Down Expand Up @@ -103,6 +103,8 @@ For more detailed information, see the guide [Integrating the Protocol Kit and A

Before a transaction can be executed, any of the Safe signers needs to initiate the process by creating a proposal of a transaction. We send this transaction to the service to make it accessible by the other owners so they can give their approval and sign the transaction as well.

For a full list and description of the properties see [`proposeTransaction`](./api-kit/reference#proposetransaction) in the API Kit reference.

```typescript
// Create transaction
const safeTransactionData: MetaTransactionData = {
Expand Down Expand Up @@ -144,7 +146,7 @@ For more detailed information, see the guide [Integrating the Protocol Kit and A

### Confirm the transaction

In this step we need to sign the transaction with the Protocol Kit and submit the signature to the Safe Transaction Service using the `confirmTransaction` method.
In this step we need to sign the transaction with the Protocol Kit and submit the signature to the Safe Transaction Service using the [`confirmTransaction`](./api-kit/reference#confirmtransaction) method.

```typescript
const protocolKitOwner2 = await Safe.init({
Expand All @@ -163,6 +165,6 @@ For more detailed information, see the guide [Integrating the Protocol Kit and A
)
```

The Safe transaction is now ready to be executed. This can be done using the Safe\{Wallet\} web interface, the Protocol Kit, the Safe CLI or any other tool that's available.
The Safe transaction is now ready to be executed. This can be done using the [Safe\{Wallet\} web](https://app.safe.global) interface, the [Protocol Kit](./protocol-kit#execute-the-transaction), the Safe CLI or any other tool that's available.

</Steps>
2 changes: 1 addition & 1 deletion pages/sdk/auth-kit/guides/safe-auth.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ The `SafeAuthPack` is an authentication system that utilizes the [Web3Auth](http

The `SafeAuthPack` can be used with the [Protocol Kit](../../protocol-kit.mdx) to establish a connection to a Safe using the `provider`. We don't need to pass the `signer` property in the `create()` method as it will be automatically taken from the passed `provider`.

After connecting, you can use any of the methods provided in the [Protocol Kit](https://github.com/safe-global/safe-core-sdk/tree/main/packages/protocol-kit#sdk-api).
After connecting, you can use any of the methods provided in the [Protocol Kit](../../protocol-kit/reference/safe).

```typescript
// Instantiate the Protocol Kit
Expand Down
49 changes: 25 additions & 24 deletions pages/sdk/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ The Safe\{Core\} SDK groups its functionality into five different kits:

## Protocol Kit

The [Protocol Kit](./protocol-kit.mdx) helps interact with the Safe Smart Account contracts. It enables the creation of new Safe accounts, updating their configuration, and signing and executing transactions, among other features.
The [Protocol Kit](./protocol-kit.mdx) helps interact with Safe Smart Accounts. It enables the creation of new Safe accounts, updating their configuration, and signing and executing transactions, among other features.

- Modular and customizable smart contract accounts
- Battle-tested security
Expand All @@ -29,65 +29,66 @@ The [Protocol Kit](./protocol-kit.mdx) helps interact with the Safe Smart Accoun
/>
</Grid>

## Auth Kit

The [Auth Kit](./auth-kit.mdx) creates externally owned accounts and authenticates them using an email address, a social media account, or a crypto wallet account.
## API Kit

- Easy onboarding using SafeAuth
- Social and wallet logins
- Get users started without a wallet
The [API Kit](./api-kit.mdx) helps interact with the Safe Transaction Service API. It helps share transactions among the signers and get information from a Safe account. For example, the configuration or transaction history.

<Grid container mt={3}>
<CustomCard
title={'Auth Kit'}
description={'Learn about the Auth Kit and the pack integrating Web3Auth.'}
url={'./auth-kit'}
title={'API Kit'}
description={'Learn about the API Kit and the integration with the Safe Transaction Service.'}
url={'./api-kit'}
newTab={false}
/>
</Grid>

## Relay Kit

The [Relay Kit](./relay-kit.mdx) relays Safe transactions, allowing you to get them sponsored by a third party or paid with any supported ERC-20 token.
The [Relay Kit](./relay-kit.mdx) enables ERC-4337 with Safe and allows users to pay for the transaction fees from their Safe account using the blockchain native token, ERC-20 tokens, or get their transactions sponsored.

- Use ERC-4337 with Safe
- Gas-less experiences using Gelato
- Sponsored transaction
- Pay fees in ERC-20 tokens

<Grid container mt={3}>
<CustomCard
title={'Relay Kit'}
description={'Learn about the Relay Kit and the pack integrating Gelato.'}
description={'Learn about the Relay Kit and the packs integrating ERC-4337 and Gelato.'}
url={'./relay-kit'}
newTab={false}
/>
</Grid>

## Onramp Kit
## Auth Kit

The [Onramp Kit](./onramp-kit.mdx) helps users buy cryptocurrencies with fiat money to fund a Safe account via a credit card or other payment method.
The [Auth Kit](./auth-kit.mdx) creates externally owned accounts and authenticates them using an email address, a social media account, or a crypto wallet account.

- Seamless fiat on-ramping
- Pay using a credit card
- Easy onboarding using SafeAuth
- Social and wallet logins
- Get users started without a wallet

<Grid container mt={3}>
<CustomCard
title={'Onramp Kit'}
description={'Learn about the Onramp Kit and the packs integrating Monerium and Stripe.'}
url={'./onramp-kit'}
title={'Auth Kit'}
description={'Learn about the Auth Kit and the pack integrating Web3Auth.'}
url={'./auth-kit'}
newTab={false}
/>
</Grid>

## API Kit
## Onramp Kit

The [API Kit](./api-kit.mdx) helps interact with the Safe Transaction Service API. It helps share transactions among the signers and get information from a Safe account. For example, the configuration or transaction history.
The [Onramp Kit](./onramp-kit.mdx) helps users buy cryptocurrencies with fiat money to fund a Safe account via a credit card or other payment method.

- Seamless fiat on-ramping
- Pay using a credit card

<Grid container mt={3}>
<CustomCard
title={'API Kit'}
description={'Learn about the API Kit and the integration with the Safe Transaction Service.'}
url={'./api-kit'}
title={'Onramp Kit'}
description={'Learn about the Onramp Kit and the packs integrating Monerium and Stripe.'}
url={'./onramp-kit'}
newTab={false}
/>
</Grid>
Expand Down
16 changes: 8 additions & 8 deletions pages/sdk/protocol-kit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import CustomCard from '../../components/CustomCard'

# Protocol Kit

The [Protocol Kit](https://github.com/safe-global/safe-core-sdk/tree/main/packages/protocol-kit) enables developers to interact with the [Safe contracts](https://github.com/safe-global/safe-contracts) using a TypeScript interface. This Kit can be used to create new Safe accounts, update the configuration of existing Safes, propose and execute transactions, among other features.
The [Protocol Kit](https://github.com/safe-global/safe-core-sdk/tree/main/packages/protocol-kit) enables developers to interact with [Safe Smart Accounts](https://github.com/safe-global/safe-smart-account) using a TypeScript interface. This Kit can be used to create new Safe accounts, update the configuration of existing Safes, propose and execute transactions, among other features.

<Grid item mt={3}>
<CustomCard
Expand All @@ -17,7 +17,7 @@ The [Protocol Kit](https://github.com/safe-global/safe-core-sdk/tree/main/packag

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.

For a more detailed guide, including how to integrate with `web3.js` and more Safe transaction configuration options, see [Guide: Integrating the Protocol Kit and API Kit](https://github.com/safe-global/safe-core-sdk/blob/main/guides/integrating-the-safe-core-sdk.md) and [Protocol Kit Reference](https://github.com/safe-global/safe-core-sdk/tree/main/packages/protocol-kit#sdk-api).
To find more details and configuration options for available methods, see the [Protocol Kit reference](./protocol-kit/reference).

### Prerequisites

Expand Down Expand Up @@ -82,7 +82,7 @@ const apiKit = new SafeApiKit({

### Initialize the Protocol Kit

The `SafeFactory` class allows the deployment of new Safe accounts while the `Safe` class represents an instance of a specific Safe account.
The `SafeFactory` class allows the deployment of new Safe accounts while the `Safe` class represents an instance of a specific one.

```tsx
import { SafeFactory } from '@safe-global/protocol-kit'
Expand All @@ -95,7 +95,7 @@ const safeFactory = await SafeFactory.init({

### Deploy a Safe

Calling the `deploySafe` method will deploy the desired Safe and return a Protocol Kit initialized instance ready to be used. Check the [API Reference](https://github.com/safe-global/safe-core-sdk/tree/main/packages/protocol-kit#deploysafe) for more details on additional configuration parameters and callbacks.
Calling the `deploySafe` method will deploy the desired Safe and return a Protocol Kit initialized instance ready to be used. Check the [method reference](./protocol-kit/reference/safe-factory#deploysafe) for more details on additional configuration parameters and callbacks.

```tsx
import { SafeAccountConfig } from '@safe-global/protocol-kit'
Expand Down Expand Up @@ -165,7 +165,7 @@ The high-level overview of a multi-sig transaction is PCE: Propose. Confirm. Exe

### Create a transaction

For more details on what to include in a transaction see [Create a Transaction in the Safe Core SDK Guide](https://github.com/safe-global/safe-core-sdk/blob/main/guides/integrating-the-safe-core-sdk.md#4-create-a-transaction).
For more details on what to include in a transaction see [`createTransaction`](./protocol-kit/reference/safe#createtransaction) method.

```tsx
import { MetaTransactionData } from '@safe-global/safe-core-sdk-types'
Expand All @@ -187,7 +187,7 @@ const safeTransaction = await protocolKitOwner1.createTransaction({ transactions

To propose a transaction to the Safe Transaction Service we need to call the `proposeTransaction` method from the API Kit instance.

For a full list and description of the properties that `proposeTransaction` accepts, see [Propose the transaction to the service](https://github.com/safe-global/safe-core-sdk/blob/main/guides/integrating-the-safe-core-sdk.md#propose-transaction) in the Safe Core SDK guide.
For a full list and description of the properties see [`proposeTransaction`](./api-kit/reference#proposetransaction) in the API Kit reference.

```tsx
// Deterministic hash based on transaction parameters
Expand All @@ -207,7 +207,7 @@ await apiKit.proposeTransaction({

### Get pending transactions

Recall that you created the `apiKit` in [Initialize the API Kit](./#initialize-the-safe-api-kit).
Recall that you created the `apiKit` in [Initialize the API Kit](./protocol-kit/#initialize-the-api-kit).

```tsx
const pendingTransactions = (await apiKit.getPendingTransactions(safeAddress)).results
Expand Down Expand Up @@ -267,4 +267,4 @@ The final balance of the Safe: 0.005 ETH

### Conclusion

In this quickstart, you learned how to create and deploy a Safe and to propose and then execute a transaction for the Safe.
In this quickstart, you learned how to create and deploy a new Safe account and to propose and then execute a transaction from it.
2 changes: 1 addition & 1 deletion pages/sdk/protocol-kit/reference.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Reference

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

## Install dependencies

Expand Down
2 changes: 1 addition & 1 deletion pages/sdk/relay-kit.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import CustomCard from '../../components/CustomCard'

# Relay Kit

The Relay Kit lets users pay transaction fees (gas fees) using the native blockchain token or ERC-20 tokens. Gas fees can be payed with this kit using any ERC-20 token in your Safe, even if there is no native token balance.
The [Relay Kit](https://github.com/safe-global/safe-core-sdk/tree/main/packages/relay-kit) enables ERC-4337 with Safe, and allows users to pay for the transaction fees from their Safe account using the blockchain native token, ERC-20 tokens, or to get their transactions sponsored.

<Grid item mt={3}>
<CustomCard
Expand Down

0 comments on commit 3e99e9f

Please sign in to comment.