@metamask/snaps-sdk
Version:
A library containing the core functionality for building MetaMask Snaps
34 lines • 896 B
JavaScript
import { assign, object, string, unknown } from "@metamask/superstruct";
/**
* The supported node types. This is based on SIP-7.
*
* @see https://metamask.github.io/SIPs/SIPS/sip-7
*/
export var NodeType;
(function (NodeType) {
NodeType["Copyable"] = "copyable";
NodeType["Divider"] = "divider";
NodeType["Heading"] = "heading";
NodeType["Panel"] = "panel";
NodeType["Spinner"] = "spinner";
NodeType["Text"] = "text";
NodeType["Image"] = "image";
NodeType["Row"] = "row";
NodeType["Address"] = "address";
NodeType["Button"] = "button";
NodeType["Input"] = "input";
NodeType["Form"] = "form";
})(NodeType || (NodeType = {}));
/**
* @internal
*/
export const NodeStruct = object({
type: string(),
});
/**
* @internal
*/
export const LiteralStruct = assign(NodeStruct, object({
value: unknown(),
}));
//# sourceMappingURL=nodes.mjs.map