MyCrypto/shared/enclave/server/handlers/index.ts

19 lines
656 B
TypeScript
Raw Normal View History

2018-04-27 20:49:17 +00:00
import getChainCode from './getChainCode';
import signTransaction from './signTransaction';
2018-05-04 04:26:25 +00:00
import signMessage from './signMessage';
2018-05-04 04:40:32 +00:00
import displayAddress from './displayAddress';
import { EnclaveMethods, EnclaveMethodParams, EnclaveMethodResponse } from 'shared/enclave/types';
2018-04-27 20:49:17 +00:00
const handlers: {
[key in EnclaveMethods]: (
params: EnclaveMethodParams
) => EnclaveMethodResponse | Promise<EnclaveMethodResponse>
2018-04-27 20:49:17 +00:00
} = {
[EnclaveMethods.GET_CHAIN_CODE]: getChainCode,
2018-05-04 04:26:25 +00:00
[EnclaveMethods.SIGN_TRANSACTION]: signTransaction,
2018-05-04 04:40:32 +00:00
[EnclaveMethods.SIGN_MESSAGE]: signMessage,
[EnclaveMethods.DISPLAY_ADDRESS]: displayAddress
};
export default handlers;