@somnia-chain/markets-sdk


@somnia-chain/markets-sdk / index / SmartAccountInner

Type Alias: SmartAccountInner

SmartAccountInner = { sessionSeed: Hex; } | ((chainId) => Executor)

Defined in: packages/sdk/src/unified/smartAccounts.ts:39

Who sends a multi-chain account's outer transactions on each chain: a Somnia session seed (the same seed derives the same session address on every chain, so ONE key owns the account everywhere), or a factory that names an executor per chain for anything more particular.

Gotchas

  • A seed signs locally. accountFor derives the seed's key (sessionPrivateKey(seed)) and builds each chain's inner as that engine's local signer, so the seed never goes to a node. The session address is the same one the node derives.
  • Use one sending mode per address. Local and node-side sends from the same address share one nonce space. Do not also send node-side from this seed.
  • A factory must not return a createExecutor({ sessionSeed }) executor. It sends the seed to the node on every write, so accountFor refuses it with InvalidInputError.