Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
c6080de
Add wallet integration doc
its-everdred Nov 6, 2025
12698f3
coming soon guides
its-everdred Nov 6, 2025
5d24e10
Add wallet provider images and details
its-everdred Nov 7, 2025
9c2fe06
Add actions-sdk docs generation script
its-everdred Nov 7, 2025
f3660c8
include class description in generated docs
its-everdred Nov 7, 2025
eaf51d5
fix multi-line param descriptions
its-everdred Nov 7, 2025
9b18a73
add methods table with links
its-everdred Nov 7, 2025
362895c
remove dash prefix from param descriptions
its-everdred Nov 7, 2025
5cd8886
use bold links in methods table
its-everdred Nov 7, 2025
51cc6e7
Add wallet class docs generation
its-everdred Nov 7, 2025
9d880ba
Separate namespaces and properties sections
its-everdred Nov 7, 2025
bd3f5a6
Add wallet definitions reference page
its-everdred Nov 7, 2025
2ab882f
Fix frontmatter in wallet definitions
its-everdred Nov 7, 2025
e16485c
Add Lend Documentation and rename to Wallet Documentation
its-everdred Nov 7, 2025
05beaa6
Add WalletLendNamespace to lend documentation
its-everdred Nov 7, 2025
7943a9e
Add more details to wallet docs
its-everdred Nov 7, 2025
2eb074e
Add GitHub source links to function docs
its-everdred Nov 7, 2025
652f5f0
Use version tags for GitHub source links
its-everdred Nov 7, 2025
d29ac49
Use empty string instead of unknown for types
its-everdred Nov 7, 2025
faa1819
Reorder Actions SDK navigation pages
its-everdred Nov 7, 2025
eaeb779
Add wallet provider tabs
its-everdred Nov 8, 2025
ac1c377
Add lend provider tabs
its-everdred Nov 8, 2025
d2f01b4
Add asset configuration step
its-everdred Nov 8, 2025
61568d1
Add chain configuration step
its-everdred Nov 8, 2025
de38081
Add market configuration step
its-everdred Nov 8, 2025
b8a67e3
Reorder steps and add initialization
its-everdred Nov 8, 2025
e0de38c
Add filenames to code blocks
its-everdred Nov 8, 2025
5871427
Add details to config.
its-everdred Nov 8, 2025
1c35388
Replace config examples with link to guide
its-everdred Nov 8, 2025
5691036
Remove supporting assets and chains pages
its-everdred Nov 8, 2025
83d6b7e
Remove empty backticks from type columns
its-everdred Nov 8, 2025
4da643d
Fix transparent card icon backgrounds
its-everdred Nov 11, 2025
8c203fd
Add type tooltips and populate subtypes
its-everdred Nov 11, 2025
3fb39e6
remove tooltip code
its-everdred Nov 11, 2025
5c8eab3
Refactor component generation script
its-everdred Nov 11, 2025
3ef01a5
Generate docs from 0.0.4
its-everdred Nov 12, 2025
8727f2a
Update app-developers/reference/actions/integrating-wallets.mdx
its-everdred Nov 12, 2025
ebc8cf6
Move doc to guides, add Source in links
its-everdred Nov 12, 2025
1b33b64
Fix multiline table descriptions
its-everdred Nov 12, 2025
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
231 changes: 231 additions & 0 deletions app-developers/guides/configuring-actions.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
---
title: Configuring Actions
description: Learn how to configure Actions SDK for your application.
---

Actions SDK lets you choose which assets, markets, chains, protocols, and providers you want to support in your application via configuration file.

<Steps>
<Step title="Install Actions SDK">
Follow the
[quickstart](/app-developers/quickstarts/actions) guide to
add Actions SDK as a dependency in your app.
</Step>
<Step title="Integrate an embedded wallet">
Follow the [integrating
wallets](/app-developers/quickstarts/actions#choose-a-wallet-provider) guide,
choose and install a Wallet Provider.
</Step>
<Step title="Create a config file">
`actions.ts` - An accessible file that holds all of your configuration preference.
</Step>
<Step title="Configure a Wallet Provider">
Let Actions SDK know which Wallet Provider you've chosen:

<Tabs>
<Tab title="Privy">
```typescript title="actions.ts"
import type { WalletConfig } from "@eth-optimism/actions-sdk";

const walletConfig: WalletConfig = {
hostedWalletConfig: {
provider: {
type: "privy",
},
},
smartWalletConfig: {
provider: {
type: "default",
attributionSuffix: "actions",
},
},
};
```
</Tab>
<Tab title="Turnkey">
```typescript title="actions.ts"
import type { WalletConfig } from "@eth-optimism/actions-sdk";

const walletConfig: WalletConfig = {
hostedWalletConfig: {
provider: {
type: "turnkey",
},
},
smartWalletConfig: {
provider: {
type: "default",
attributionSuffix: "actions",
},
},
};
```
</Tab>
<Tab title="Dynamic">
```typescript title="actions.ts"
import type { WalletConfig } from "@eth-optimism/actions-sdk";

const walletConfig: WalletConfig = {
hostedWalletConfig: {
provider: {
type: "dynamic",
},
},
smartWalletConfig: {
provider: {
type: "default",
attributionSuffix: "actions",
},
},
};
```
</Tab>
</Tabs>

</Step>
<Step title="Configure supported assets">
Configure which assets you want to support:

```typescript title="actions.ts"
// Additional config from previous steps...

// Import popular assets
import { USDC } from '@eth-optimism/actions-sdk/assets'

// Or define custom assets
import type { Asset } from "@eth-optimism/actions-sdk";

export const CustomToken: Asset = {
address: {
[mainnet.id]: '0x123...',
[unichain.id]: '0x456...',
[baseSepolia.id]: '0x789...',
},
metadata: {
decimals: 6,
name: 'Custom Token',
symbol: 'CUSTOM',
},
type: 'erc20',
}
```

</Step>
<Step title="Configure Markets">
Define which markets you want to support or block within your app:

```typescript title="actions.ts"
// Additional config from previous steps...

export const GauntletUSDC: LendMarketConfig = {
address: '0xabc...',
chainId: unichain.id,
name: 'Gauntlet USDC',
asset: USDC,
lendProvider: 'morpho',
}
```

</Step>
<Step title="Configure a Lend Provider">
Configure which lend protocol you want to support:

<Tabs>
<Tab title="Morpho">
```typescript title="actions.ts"
// Additional config from previous steps...

import type { LendConfig } from "@eth-optimism/actions-sdk";

const lendConfig: LendConfig = {
type: "morpho",
assetAllowlist: [USDC, CustomToken],
assetBlocklist: [],
marketAllowlist: [GauntletUSDC],
marketBlocklist: [],
};
```
</Tab>
<Tab title="Aave">
```typescript title="actions.ts"
// Additional config from previous steps...

import type { LendConfig } from "@eth-optimism/actions-sdk";

const lendConfig: LendConfig = {
type: "aave",
assetAllowlist: [USDC, CustomToken],
assetBlocklist: [],
marketAllowlist: [],
marketBlocklist: [],
};
```
</Tab>
</Tabs>

</Step>
<Step title="Configure supported chains">
Configure supported chains:

```typescript title="actions.ts"
// Additional config from previous steps...

import { optimism, base } from "viem/chains";

// Define any EVM chain
const OPTIMISM = {
chainId: optimism.id,
rpcUrls: env.OPTIMISM_RPC_URL,
bundler: {
// Bundle and sponsor txs with a gas paymaster
type: "simple" as const,
url: env.OPTIMISM_BUNDLER_URL,
},
};

const BASE = {
chainId: base.id,
rpcUrls: env.BASE_RPC_URL,
bundler: {
// Bundle and sponsor txs with a gas paymaster
type: "simple" as const,
url: env.BASE_BUNDLER_URL,
},
};

const chains = [OPTIMISM, BASE];
```

</Step>
<Step title="Initialize Actions">
Finally bring it all together and initialize Actions:

```typescript title="actions.ts"
// Additional config from previous steps...

export const actions = createActions({
wallet: walletConfig,
lend: lendConfig,
chains,
});
```

</Step>
<Step title="Take Action">
Once you've initialized your actions instance, import it anywhere you need to take action:

```typescript
import { actions } from './actions';

// Use actions anywhere in your app
const market = await actions.lend.getMarket({ ... });
const wallet = await actions.wallet.createSmartWallet({ ... });
const receipt = await wallet.lend.openPosition({ ... });
```

</Step>
</Steps>

## Next Steps

For detailed API documentation and type definitions, see the [Actions SDK Reference](/app-developers/reference/actions).
Loading