This source code is licensed under the MIT license found in the LICENSE file in the root
5 | * directory of this source tree.
6 | */
7 | package com.reactnativewallet;
8 |
9 | import android.content.Context;
10 | import com.facebook.react.ReactInstanceManager;
11 |
12 | /**
13 | * Class responsible of loading Flipper inside your React Native application. This is the release
14 | * flavor of it so it's empty as we don't want to load Flipper.
15 | */
16 | public class ReactNativeFlipper {
17 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
18 | // Do nothing as we don't want to initialize Flipper on Release.
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/frontend/ReactNativeWallet/components/WalletButton.tsx:
--------------------------------------------------------------------------------
1 | /* eslint-disable react-native/no-inline-styles */
2 | import React from 'react';
3 | import {Text, View} from 'react-native';
4 | import { Fonts } from '../screens/style';
5 |
6 | const WalletLogo = () => {
7 | return (
8 | This source code is licensed under the MIT license found in the LICENSE file in the root
5 | * directory of this source tree.
6 | */
7 | package com.reactnativewallet;
8 |
9 | import android.content.Context;
10 | import com.facebook.flipper.android.AndroidFlipperClient;
11 | import com.facebook.flipper.android.utils.FlipperUtils;
12 | import com.facebook.flipper.core.FlipperClient;
13 | import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
14 | import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
15 | import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
16 | import com.facebook.flipper.plugins.inspector.DescriptorMapping;
17 | import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
18 | import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
19 | import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
20 | import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
21 | import com.facebook.react.ReactInstanceEventListener;
22 | import com.facebook.react.ReactInstanceManager;
23 | import com.facebook.react.bridge.ReactContext;
24 | import com.facebook.react.modules.network.NetworkingModule;
25 | import okhttp3.OkHttpClient;
26 |
27 | /**
28 | * Class responsible of loading Flipper inside your React Native application. This is the debug
29 | * flavor of it. Here you can add your own plugins and customize the Flipper setup.
30 | */
31 | public class ReactNativeFlipper {
32 | public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
33 | if (FlipperUtils.shouldEnableFlipper(context)) {
34 | final FlipperClient client = AndroidFlipperClient.getInstance(context);
35 |
36 | client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
37 | client.addPlugin(new DatabasesFlipperPlugin(context));
38 | client.addPlugin(new SharedPreferencesFlipperPlugin(context));
39 | client.addPlugin(CrashReporterPlugin.getInstance());
40 |
41 | NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
42 | NetworkingModule.setCustomClientBuilder(
43 | new NetworkingModule.CustomClientBuilder() {
44 | @Override
45 | public void apply(OkHttpClient.Builder builder) {
46 | builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
47 | }
48 | });
49 | client.addPlugin(networkFlipperPlugin);
50 | client.start();
51 |
52 | // Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
53 | // Hence we run if after all native modules have been initialized
54 | ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
55 | if (reactContext == null) {
56 | reactInstanceManager.addReactInstanceEventListener(
57 | new ReactInstanceEventListener() {
58 | @Override
59 | public void onReactContextInitialized(ReactContext reactContext) {
60 | reactInstanceManager.removeReactInstanceEventListener(this);
61 | reactContext.runOnNativeModulesQueueThread(
62 | new Runnable() {
63 | @Override
64 | public void run() {
65 | client.addPlugin(new FrescoFlipperPlugin());
66 | }
67 | });
68 | }
69 | });
70 | } else {
71 | client.addPlugin(new FrescoFlipperPlugin());
72 | }
73 | }
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/frontend/ReactNativeWallet/ios/ReactNativeWallet.xcodeproj/xcshareddata/xcschemes/ReactNativeWallet.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 | [Showcase page](https://ethglobal.com/showcase/opclave-opstack-impr-erc4337-and-apple-sign-94def)
6 |
7 | Opclave is an OP Stack improvement with ERC-4337 compatible SC accounts that uses signatures abstracted with AppleEnclave which allows users to create and use non-custodial wallets with touch/face id without having seed phrases and improved with AttestationStationSDK.
8 |
9 | [ETHGlobal Scaling 2023 Hackathon](https://ethglobal.com/events/scaling2023) project
10 |
11 |
12 |
13 | | Team Member | Role |
14 | | ----------------------------------------------- | --------------- |
15 | | [0xulas.eth](https://twitter.com/ulerdogan) | Client |
16 | | [tahos.eth](https://twitter.com/0xTahos) | Smart Contracts |
17 | | [zetsub0ii.eth](https://twitter.com/zetsuboii_) | Wallet |
18 | | [0xdogan.eth](https://twitter.com/doganeth) | Research |
19 | | [buzagi.eth](https://twitter.com/thebuzagi) | Design |
20 |
21 |
22 |
23 | Project Base:
24 | ```
25 | opclave-scaling2023/
26 | ├── bundler/
27 | ├── docker/
28 | ├── frontend/
29 | ├── opclave-contracts/ (S)
30 | ├──── opclave-scaling2023_opgeth/ (S)
31 | └──── precompiles/
32 |
33 | bundler: bundler app for the AA
34 | docker: docker configs and commands
35 | frontend: mobile wallet app
36 | opclave-contracts: submodule of smarts contracts / wallet for AA
37 | scaling2023_opgeth: submodule of customized op-geth
38 | precompiles: go scripts of precompile contract
39 | ```
--------------------------------------------------------------------------------
/frontend/ReactNativeWallet/ios/EnclaveModule.m:
--------------------------------------------------------------------------------
1 | //
2 | // EnclaveModule.m
3 | // ReactNativeWallet
4 | //
5 | // Created by zetsuboii on 14.03.2023.
6 | //
7 |
8 | #import