UNPKG

@metamask/ocap-kernel

Version:
1 lines 1.05 kB
{"version":3,"file":"ping.mjs","sourceRoot":"","sources":["../../../src/rpc/vat/ping.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,+BAA+B;AACxD,OAAO,EAAE,MAAM,EAAE,8BAA8B;AAI/C,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,MAAM,EAAE,MAAM;IACd,MAAM,EAAE,cAAc;IACtB,MAAM,EAAE,MAAM,EAAE;CACR,CAAC;AAKX,MAAM,CAAC,MAAM,WAAW,GAAgB;IACtC,GAAG,QAAQ;IACX,KAAK,EAAE,EAAE;IACT,cAAc,EAAE,GAAG,EAAE,CAAC,MAAM;CAC7B,CAAC","sourcesContent":["import type { MethodSpec, Handler } from '@metamask/kernel-rpc-methods';\nimport { EmptyJsonArray } from '@metamask/kernel-utils';\nimport { string } from '@metamask/superstruct';\n\nexport type PingSpec = MethodSpec<'ping', EmptyJsonArray, string>;\n\nexport const pingSpec: PingSpec = {\n method: 'ping',\n params: EmptyJsonArray,\n result: string(),\n} as const;\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport type PingHandler = Handler<'ping', EmptyJsonArray, string, {}>;\n\nexport const pingHandler: PingHandler = {\n ...pingSpec,\n hooks: {},\n implementation: () => 'pong',\n};\n"]}