UNPKG

@metamask/keyring-api

Version:
32 lines 1.1 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.KeyringRequestStruct = void 0; const keyring_utils_1 = require("@metamask/keyring-utils"); const superstruct_1 = require("@metamask/superstruct"); const utils_1 = require("@metamask/utils"); exports.KeyringRequestStruct = (0, keyring_utils_1.object)({ /** * Keyring request ID (UUIDv4). */ id: keyring_utils_1.UuidStruct, /** * Request's scope (CAIP-2 chain ID). */ scope: (0, superstruct_1.string)(), /** * Account ID (UUIDv4). */ account: keyring_utils_1.UuidStruct, /** * Origin of the sender. */ origin: (0, superstruct_1.string)(), /** * Inner request sent by the client application. */ request: (0, keyring_utils_1.object)({ method: (0, superstruct_1.string)(), params: (0, keyring_utils_1.exactOptional)((0, superstruct_1.union)([(0, superstruct_1.array)(utils_1.JsonStruct), (0, superstruct_1.record)((0, superstruct_1.string)(), utils_1.JsonStruct)])), }), }); //# sourceMappingURL=request.cjs.map