@metamask/snaps-sdk
Version:
A library containing the core functionality for building MetaMask Snaps
1 lines • 938 B
Source Map (JSON)
{"version":3,"file":"get-state.cjs","sourceRoot":"","sources":["../../../src/types/methods/get-state.ts"],"names":[],"mappings":"","sourcesContent":["import type { Json } from '@metamask/utils';\n\n/**\n * The request parameters for the `snap_getState` method.\n *\n * @property key - The key of the state to retrieve. If not provided, the entire\n * state is retrieved. This may contain Lodash-style path syntax, e.g.,\n * `a.b.c`, with the exception of array syntax.\n * @property encrypted - Whether to use the separate encrypted state, or the\n * unencrypted state. Defaults to the encrypted state. Encrypted state can only\n * be used if the client is unlocked, while unencrypted state can be used\n * whether the client is locked or unlocked.\n */\nexport type GetStateParams = {\n key?: string;\n encrypted?: boolean;\n};\n\n/**\n * The result returned by the `snap_getState` method.\n */\nexport type GetStateResult = Json;\n"]}