Polkadot Apps
    Preparing search index...

    Interface AccountPersistence

    Adapter for persisting the selected account address across sessions.

    globalThis.localStorage satisfies this interface. Pass a custom implementation for container environments (e.g., hostLocalStorage) or for testing.

    interface AccountPersistence {
        getItem(key: string): string | Promise<string | null> | null;
        removeItem(key: string): void | Promise<void>;
        setItem(key: string, value: string): void | Promise<void>;
    }
    Index

    Methods

    • Parameters

      • key: string

      Returns string | Promise<string | null> | null

    • Parameters

      • key: string
      • value: string

      Returns void | Promise<void>