@metamask-previews/keyring-snap-sdk
Version:
MetaMask Keyring Snap SDK
13 lines • 798 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.JsonRpcRequestStruct = void 0;
const keyring_utils_1 = require("@metamask/keyring-utils");
const superstruct_1 = require("@metamask/superstruct");
const utils_1 = require("@metamask/utils");
exports.JsonRpcRequestStruct = (0, keyring_utils_1.object)({
jsonrpc: (0, superstruct_1.literal)('2.0'),
id: (0, superstruct_1.union)([(0, superstruct_1.string)(), (0, superstruct_1.number)(), (0, superstruct_1.literal)(null)]),
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=JsonRpcRequest.js.map