@metamask/ocap-kernel
Version:
OCap kernel core components
1 lines • 1.51 kB
Source Map (JSON)
{"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/rpc/vat/index.ts"],"names":[],"mappings":";;;AAEA,8CAA2D;AAE3D,8CAA2D;AAE3D,wCAAkD;AAGlD,8EAA8E;AAC9E,mDAAmD;AAEtC,QAAA,WAAW,GAAG;IACzB,OAAO,EAAE,2BAAc;IACvB,OAAO,EAAE,2BAAc;IACvB,IAAI,EAAE,qBAAW;CAKlB,CAAC;AAEW,QAAA,cAAc,GAAG;IAC5B,OAAO,EAAE,wBAAW;IACpB,OAAO,EAAE,wBAAW;IACpB,IAAI,EAAE,kBAAQ;CAKf,CAAC","sourcesContent":["import type { Infer } from '@metamask/superstruct';\n\nimport { deliverSpec, deliverHandler } from './deliver.ts';\nimport type { DeliverSpec, DeliverHandler } from './deliver.ts';\nimport { initVatSpec, initVatHandler } from './initVat.ts';\nimport type { InitVatSpec, InitVatHandler } from './initVat.ts';\nimport { pingSpec, pingHandler } from './ping.ts';\nimport type { PingSpec, PingHandler } from './ping.ts';\n\n// The handler and spec exports are explicitly annotated due to a TS2742 error\n// that occurs during CommonJS builds by ts-bridge.\n\nexport const vatHandlers = {\n deliver: deliverHandler,\n initVat: initVatHandler,\n ping: pingHandler,\n} as {\n deliver: DeliverHandler;\n initVat: InitVatHandler;\n ping: PingHandler;\n};\n\nexport const vatMethodSpecs = {\n deliver: deliverSpec,\n initVat: initVatSpec,\n ping: pingSpec,\n} as {\n deliver: DeliverSpec;\n initVat: InitVatSpec;\n ping: PingSpec;\n};\n\ntype Handlers = (typeof vatHandlers)[keyof typeof vatHandlers];\n\nexport type VatMethod = Handlers['method'];\n\nexport type PingVatResult = Infer<PingSpec['result']>;\n"]}