@somnia-chain/markets-sdk


@somnia-chain/markets-sdk / native / sessionAddress

Function: sessionAddress()

sessionAddress(seed): `0x${string}`

Defined in: packages/sdk/src/native/session.ts:97

The address a session seed controls — computed locally, no RPC.

Identical to what somnia_getSessionAddress returns for the same seed, and cheaper: use it to display or pre-fund a session account before any network call. client.getSessionAddress(seed) asks the node the same question if you want the round-trip as confirmation.

ts
import { sessionAddress } from "@somnia-chain/markets-sdk/native";

const seed = "0x1111111111111111111111111111111111111111111111111111111111111111";
sessionAddress(seed); // "0xD56D8c05Aa8dA0f3Afd676Aec94014e89aF3cc51" — fund this

Parameters

seed

`0x${string}`

32-byte session seed.

Returns

`0x${string}`

The checksummed address of the derived account.

Throws

If the seed is not 32 bytes of hex.