Skip to content

Commit

Permalink
Merge pull request #951 from Web3Auth/add-trust-smart-account
Browse files Browse the repository at this point in the history
[AA Provider] Add Trust Smart Account
  • Loading branch information
shahbaz17 authored Oct 17, 2024
2 parents b4469ca + 77ca27e commit e24b30c
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion src/common/sdk/pnp/web/_smart-account-provider-configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ import TabItem from "@theme/TabItem";
import Tabs from "@theme/Tabs";

Web3Auth offers the flexibility to choose your preferred Account Abstraction (AA) provider.
Currently, we support Safe, Kernel, and Biconomy.
Currently, we support Safe, Kernel, Biconomy, and Trust.

<Tabs
defaultValue="safe"
values={[
{ label: "Safe", value: "safe" },
{ label: "Kernel", value: "kernel" },
{ label: "Biconomy", value: "biconomy" },
{ label: "Trust", value: "trust" },
]}
>

Expand Down Expand Up @@ -113,5 +114,39 @@ const accountAbstractionProvider = new AccountAbstractionProvider({
});
```

</TabItem>

<TabItem value="trust">

```ts
import {
AccountAbstractionProvider,
TrustSmartAccount,
} from "@web3auth/account-abstraction-provider";

const chainConfig = {
chainNamespace: CHAIN_NAMESPACES.EIP155,
chainId: "0xaa36a7",
rpcTarget: "https://rpc.ankr.com/eth_sepolia",
displayName: "Ethereum Sepolia Testnet",
blockExplorerUrl: "https://sepolia.etherscan.io",
ticker: "ETH",
tickerName: "Ethereum",
logo: "https://cryptologos.cc/logos/ethereum-eth-logo.png",
};

const accountAbstractionProvider = new AccountAbstractionProvider({
config: {
chainConfig,
bundlerConfig: {
// Get the pimlico API Key from dashboard.pimlico.io
url: `https://api.pimlico.io/v2/11155111/rpc?apikey=${pimlicoAPIKey}`,
},
// focus-next-line
smartAccountInit: new TrustSmartAccount(),
},
});
```

</TabItem>
</Tabs>

0 comments on commit e24b30c

Please sign in to comment.