diff --git a/native/schema/CommRustModuleSchema.js b/native/schema/CommRustModuleSchema.js new file mode 100644 index 000000000..fec662125 --- /dev/null +++ b/native/schema/CommRustModuleSchema.js @@ -0,0 +1,51 @@ +// @flow + +'use strict'; + +import { TurboModuleRegistry } from 'react-native'; +import type { TurboModule } from 'react-native/Libraries/TurboModule/RCTExport.js'; + +export interface Spec extends TurboModule { + +generateNonce: () => Promise; + +registerUser: ( + username: string, + password: string, + keyPayload: string, + keyPayloadSignature: string, + contentPrekey: string, + contentPrekeySignature: string, + notifPrekey: string, + notifPrekeySignature: string, + contentOneTimeKeys: $ReadOnlyArray, + notifOneTimeKeys: $ReadOnlyArray, + ) => Promise; + +loginPasswordUser: ( + username: string, + password: string, + keyPayload: string, + keyPayloadSignature: string, + contentPrekey: string, + contentPrekeySignature: string, + notifPrekey: string, + notifPrekeySignature: string, + contentOneTimeKeys: $ReadOnlyArray, + notifOneTimeKeys: $ReadOnlyArray, + ) => Promise; + +loginWalletUser: ( + siweMessage: string, + siweSignature: string, + keyPayload: string, + keyPayloadSignature: string, + contentPrekey: string, + contentPrekeySignature: string, + notifPrekey: string, + notifPrekeySignature: string, + contentOneTimeKeys: $ReadOnlyArray, + notifOneTimeKeys: $ReadOnlyArray, + socialProof: string, + ) => Promise; +} + +export default (TurboModuleRegistry.getEnforcing( + 'CommRustTurboModule', +): Spec);