UNPKG

@metamask/keyring-api

Version:
29 lines 779 B
import { exactOptional, object, UuidStruct } from "@metamask/keyring-utils"; import { array, record, string, union } from "@metamask/superstruct"; import { JsonStruct } from "@metamask/utils"; export const KeyringRequestStruct = object({ /** * Keyring request ID (UUIDv4). */ id: UuidStruct, /** * Request's scope (CAIP-2 chain ID). */ scope: string(), /** * Account ID (UUIDv4). */ account: UuidStruct, /** * Origin of the sender. */ origin: string(), /** * Inner request sent by the client application. */ request: object({ method: string(), params: exactOptional(union([array(JsonStruct), record(string(), JsonStruct)])), }), }); //# sourceMappingURL=request.mjs.map