{"version":3,"file":"transaction.cjs","sourceRoot":"","sources":["../../src/handlers/transaction.ts"],"names":[],"mappings":";;;AAAA,mDAA8E;AAC9E,uDAQ+B;AAElB,QAAA,mCAAmC,GAAG,IAAA,oBAAM,EAAC;IACxD,QAAQ,EAAE,IAAA,sBAAQ,EAAC,IAAA,qBAAO,EAAC,yBAAa,CAAC,QAAQ,CAAC,CAAC;CACpD,CAAC,CAAC;AAEU,QAAA,iCAAiC,GAAG,IAAA,oBAAM,EACrD,2CAAmC,EACnC,IAAA,oBAAM,EAAC;IACL,EAAE,EAAE,IAAA,oBAAM,GAAE;CACb,CAAC,CACH,CAAC;AAEW,QAAA,sCAAsC,GAAG,IAAA,oBAAM,EAC1D,2CAAmC,EACnC,IAAA,oBAAM,EAAC;IACL,OAAO,EAAE,oCAAwB;CAClC,CAAC,CACH,CAAC;AAEW,QAAA,2BAA2B,GAAG,IAAA,sBAAQ,EACjD,IAAA,mBAAK,EAAC;IACJ,8CAAsC;IACtC,yCAAiC;CAClC,CAAC,CACH,CAAC","sourcesContent":["import { ComponentOrElementStruct, SeverityLevel } from '@metamask/snaps-sdk';\nimport {\n  literal,\n  object,\n  optional,\n  string,\n  assign,\n  nullable,\n  union,\n} from '@metamask/superstruct';\n\nexport const OnTransactionSeverityResponseStruct = object({\n  severity: optional(literal(SeverityLevel.Critical)),\n});\n\nexport const OnTransactionResponseWithIdStruct = assign(\n  OnTransactionSeverityResponseStruct,\n  object({\n    id: string(),\n  }),\n);\n\nexport const OnTransactionResponseWithContentStruct = assign(\n  OnTransactionSeverityResponseStruct,\n  object({\n    content: ComponentOrElementStruct,\n  }),\n);\n\nexport const OnTransactionResponseStruct = nullable(\n  union([\n    OnTransactionResponseWithContentStruct,\n    OnTransactionResponseWithIdStruct,\n  ]),\n);\n"]}