Skip to content

Add smart-wallets recipe: session keys + viem account end-to-end example #39

@marcos-golem

Description

@marcos-golem

Every [ ARKIV ] quickstart today shows privateKeyToAccount pulling a raw key from .env. That is not the production path for agents, dApps, or any builder moving past prototype — yet there is no worked example showing the smart-wallet pattern. The SDK already accepts any viem-compatible account, so the capability exists; it is just invisible.

What: Add a recipes/smart-wallets/ page with one fully worked, end-to-end example covering:

  • Connecting a smart-wallet account to the [ ARKIV ] SDK
  • Creating a session key scoped to an [ ARKIV ] operation
  • Creating and mutating an entity using that session key
  • Handling entity expiration correctly (expiration is scheduled at write time, not enforced by teardown)

How:

  • Choose the canonical wallet partner for the worked example (see open decision below)
  • Write the end-to-end code example against that partner's SDK + viem adapter
  • Add a short paragraph at the top of the page noting where Safe, Privy, and Coinbase Smart Wallet diverge — so builders using a different stack have a starting point without a full second recipe
  • Add a cross-link from the existing quickstart page ("Ready for production? See the smart-wallets recipe") at the point where privateKeyToAccount is introduced
  • Validate the example compiles and runs against the current SDK version before merging

Open decision — wallet partner choice:

The recipe needs one canonical example. Three candidates:

Partner Notes
Safe Broadest ecosystem recognition; session-key support via Safe{Core} AA SDK; more setup steps
Privy Lowest onboarding friction for builders new to AA; embedded-wallet story maps well to agent use cases
Coinbase Smart Wallet Strong Base/Ethereum alignment; simple viem adapter; narrower audience

Input needed from whoever owns wallet partnerships before work begins.

Metadata

Metadata

Assignees

Labels

documentationImprovements or additions to documentationenhancementNew feature or request

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions