-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b212552
commit d898cae
Showing
6 changed files
with
737 additions
and
632 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
// [!region main] | ||
import Capsule from "@usecapsule/web-sdk" | ||
import { createCapsuleViemClient } from "@usecapsule/viem-v2-integration" | ||
import Para from "@getpara/web-sdk" | ||
import { createParaViemClient } from "@getpara/viem-v2-integration" | ||
import { toSafeSmartAccount } from "permissionless/accounts" | ||
import { http } from "viem" | ||
import { sepolia } from "viem/chains" | ||
|
||
// Param options here will be specific to your project. See the Capsule docs for more info. | ||
const capsule = new Capsule(env, apiKey) | ||
// Param options here will be specific to your project. See the Para docs for more info. | ||
const para = new Para(env, apiKey) | ||
|
||
// Follow the Capsule docs for more instructions on creating the Viem client https://docs.usecapsule.com/integration-guide/signing-transactions | ||
const smartAccountOwner = createCapsuleViemClient(capsule, { | ||
// Convert a Para viem client to a SmartAccountSigner | ||
// Follow the Para docs for more instructions on creating the Viem client https://docs.getpara.com/integration-guide/signing-transactions | ||
const viemClient = createParaViemClient(para, { | ||
chain: sepolia, | ||
transport: http("https://rpc.ankr.com/eth_sepolia"), | ||
}) | ||
|
||
const smartAccountSigner = toSafeSmartAccount({ owners: [viemClient] }) | ||
// [!endregion main] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.