Skip to content

Commit

Permalink
viemish cosm-r1 structure
Browse files Browse the repository at this point in the history
  • Loading branch information
code-z2 committed Oct 3, 2024
1 parent 846080e commit 5993db7
Show file tree
Hide file tree
Showing 18 changed files with 258 additions and 174 deletions.
264 changes: 135 additions & 129 deletions apps/native/ios/Podfile.lock

Large diffs are not rendered by default.

66 changes: 35 additions & 31 deletions apps/native/ios/native.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,29 @@
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
1B7866D9598144A08EA20ECC /* noop-file.swift in Sources */ = {isa = PBXBuildFile; fileRef = A773876745534454B065C3AC /* noop-file.swift */; };
3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */; };
600ABCAF7018ED2A211EB9AA /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = EB31533938FBAD1E2D6EB5BC /* PrivacyInfo.xcprivacy */; };
96905EF65AED1B983A6B3ABC /* libPods-native.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 58EEBF8E8E6FB1BC6CAF49B5 /* libPods-native.a */; };
B18059E884C0ABDD17F3DC3D /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAC715A2D49A985799AEE119 /* ExpoModulesProvider.swift */; };
BB2F792D24A3F905000567C9 /* Expo.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB2F792C24A3F905000567C9 /* Expo.plist */; };
E2AF6B1AF61540DFB69CB6CE /* noop-file.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C47DE4934A343F3A02C1615 /* noop-file.swift */; };
E8FCF744927B8DE7F4BD4EB6 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 935468F84576018E365B3DFA /* PrivacyInfo.xcprivacy */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
06FBFD2E6B0C44A5916DE07B /* native-Bridging-Header.h */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.h; name = "native-Bridging-Header.h"; path = "native/native-Bridging-Header.h"; sourceTree = "<group>"; };
13B07F961A680F5B00A75B9A /* native.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = native.app; sourceTree = BUILT_PRODUCTS_DIR; };
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = native/AppDelegate.h; sourceTree = "<group>"; };
13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = native/AppDelegate.mm; sourceTree = "<group>"; };
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = native/Images.xcassets; sourceTree = "<group>"; };
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = native/Info.plist; sourceTree = "<group>"; };
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = native/main.m; sourceTree = "<group>"; };
4C47DE4934A343F3A02C1615 /* noop-file.swift */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.swift; name = "noop-file.swift"; path = "native/noop-file.swift"; sourceTree = "<group>"; };
58EEBF8E8E6FB1BC6CAF49B5 /* libPods-native.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-native.a"; sourceTree = BUILT_PRODUCTS_DIR; };
6C2E3173556A471DD304B334 /* Pods-native.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-native.debug.xcconfig"; path = "Target Support Files/Pods-native/Pods-native.debug.xcconfig"; sourceTree = "<group>"; };
7A4D352CD337FB3A3BF06240 /* Pods-native.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-native.release.xcconfig"; path = "Target Support Files/Pods-native/Pods-native.release.xcconfig"; sourceTree = "<group>"; };
935468F84576018E365B3DFA /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = native/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
9906C66B96C34935AC229BA4 /* native-Bridging-Header.h */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.h; name = "native-Bridging-Header.h"; path = "native/native-Bridging-Header.h"; sourceTree = "<group>"; };
A773876745534454B065C3AC /* noop-file.swift */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.swift; name = "noop-file.swift"; path = "native/noop-file.swift"; sourceTree = "<group>"; };
AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = SplashScreen.storyboard; path = native/SplashScreen.storyboard; sourceTree = "<group>"; };
BB2F792C24A3F905000567C9 /* Expo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Expo.plist; sourceTree = "<group>"; };
EB31533938FBAD1E2D6EB5BC /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = native/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
FAC715A2D49A985799AEE119 /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-native/ExpoModulesProvider.swift"; sourceTree = "<group>"; };
/* End PBXFileReference section */
Expand All @@ -59,9 +59,9 @@
13B07FB61A68108700A75B9A /* Info.plist */,
13B07FB71A68108700A75B9A /* main.m */,
AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */,
4C47DE4934A343F3A02C1615 /* noop-file.swift */,
06FBFD2E6B0C44A5916DE07B /* native-Bridging-Header.h */,
935468F84576018E365B3DFA /* PrivacyInfo.xcprivacy */,
A773876745534454B065C3AC /* noop-file.swift */,
9906C66B96C34935AC229BA4 /* native-Bridging-Header.h */,
EB31533938FBAD1E2D6EB5BC /* PrivacyInfo.xcprivacy */,
);
name = native;
sourceTree = "<group>";
Expand Down Expand Up @@ -147,13 +147,13 @@
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "native" */;
buildPhases = (
08A4A3CD28434E44B6B9DE2E /* [CP] Check Pods Manifest.lock */,
3931066B4D3049BFFB37210C /* [Expo] Configure project */,
B2B8B9F8B0387162A23A0B3B /* [Expo] Configure project */,
13B07F871A680F5B00A75B9A /* Sources */,
13B07F8C1A680F5B00A75B9A /* Frameworks */,
13B07F8E1A680F5B00A75B9A /* Resources */,
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
800E24972A6A228C8D4807E9 /* [CP] Copy Pods Resources */,
FE53820B1F47AB7F38F57042 /* [CP] Embed Pods Frameworks */,
4E43BEAD9B82DC65189948A2 /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -203,7 +203,7 @@
BB2F792D24A3F905000567C9 /* Expo.plist in Resources */,
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */,
E8FCF744927B8DE7F4BD4EB6 /* PrivacyInfo.xcprivacy in Resources */,
600ABCAF7018ED2A211EB9AA /* PrivacyInfo.xcprivacy in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -247,24 +247,23 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
3931066B4D3049BFFB37210C /* [Expo] Configure project */ = {
4E43BEAD9B82DC65189948A2 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-native/Pods-native-frameworks.sh",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes",
);
name = "[Expo] Configure project";
outputFileListPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# This script configures Expo modules and generates the modules provider file.\nbash -l -c \"./Pods/Target\\ Support\\ Files/Pods-native/expo-configure-project.sh\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-native/Pods-native-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
800E24972A6A228C8D4807E9 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
Expand All @@ -274,35 +273,40 @@
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-native/Pods-native-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/EXConstants.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/ExpoConstants_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/ExpoFileSystem/ExpoFileSystem_privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXConstants.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoConstants_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoFileSystem_privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-native/Pods-native-resources.sh\"\n";
showEnvVarsInLog = 0;
};
FE53820B1F47AB7F38F57042 /* [CP] Embed Pods Frameworks */ = {
B2B8B9F8B0387162A23A0B3B /* [Expo] Configure project */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-native/Pods-native-frameworks.sh",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes",
);
name = "[CP] Embed Pods Frameworks";
name = "[Expo] Configure project";
outputFileListPaths = (
);
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-native/Pods-native-frameworks.sh\"\n";
showEnvVarsInLog = 0;
shellScript = "# This script configures Expo modules and generates the modules provider file.\nbash -l -c \"./Pods/Target\\ Support\\ Files/Pods-native/expo-configure-project.sh\"\n";
};
/* End PBXShellScriptBuildPhase section */

Expand All @@ -314,7 +318,7 @@
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */,
13B07FC11A68108700A75B9A /* main.m in Sources */,
B18059E884C0ABDD17F3DC3D /* ExpoModulesProvider.swift in Sources */,
E2AF6B1AF61540DFB69CB6CE /* noop-file.swift in Sources */,
1B7866D9598144A08EA20ECC /* noop-file.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -345,7 +349,7 @@
);
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
PRODUCT_BUNDLE_IDENTIFIER = space.variance.internal;
PRODUCT_NAME = "native";
PRODUCT_NAME = native;
SWIFT_OBJC_BRIDGING_HEADER = "native/native-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
Expand Down Expand Up @@ -373,7 +377,7 @@
);
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = space.variance.internal;
PRODUCT_NAME = "native";
PRODUCT_NAME = native;
SWIFT_OBJC_BRIDGING_HEADER = "native/native-Bridging-Header.h";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
Expand Down Expand Up @@ -441,7 +445,7 @@
"$(inherited)",
" ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
};
Expand Down Expand Up @@ -499,7 +503,7 @@
"$(inherited)",
" ",
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../../../node_modules/react-native";
SDKROOT = iphoneos;
USE_HERMES = true;
VALIDATE_PRODUCT = YES;
Expand Down
15 changes: 13 additions & 2 deletions apps/native/ios/native/PrivacyInfo.xcprivacy
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,31 @@
<dict>
<key>NSPrivacyAccessedAPITypes</key>
<array>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>0A2A.1</string>
<string>3B52.1</string>
<string>C617.1</string>
</array>
</dict>
<dict>
<key>NSPrivacyAccessedAPIType</key>
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
<string>NSPrivacyAccessedAPICategoryDiskSpace</string>
<key>NSPrivacyAccessedAPITypeReasons</key>
<array>
<string>CA92.1</string>
<string>E174.1</string>
<string>85F4.1</string>
</array>
</dict>
<dict>
Expand Down
5 changes: 3 additions & 2 deletions apps/native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
},
"dependencies": {
"@vaariance/ui": "workspace:*",
"expo": "~51.0.28",
"expo": "~51.0.35",
"expo-status-bar": "~1.12.1",
"expo-system-ui": "~3.0.7",
"nativewind": "^4.0.1",
"react": "^18.2.0",
"react": "18.2.0",
"react-native": "0.74.5",
"react-native-reanimated": "~3.10.1",
"tailwindcss": "^3.4.13"
Expand Down
Binary file modified bun.lockb
Binary file not shown.
1 change: 0 additions & 1 deletion packages/cosm-r1/index.ts

This file was deleted.

11 changes: 11 additions & 0 deletions packages/cosm-r1/src/accounts.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// passkeyToAccount (pkp)

// registerPasskey (username, displayname)

// authenticateWithPasskey(message)

// getAddress

// signTransaction

//
5 changes: 5 additions & 0 deletions packages/cosm-r1/src/actions/cosmwasmActions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// executeContract

// deployContract

// queryContract
1 change: 1 addition & 0 deletions packages/cosm-r1/src/actions/ibcActions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// ibcTokenTransfer
25 changes: 25 additions & 0 deletions packages/cosm-r1/src/actions/publicActions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// generateSignDoc

// broadcastSignedDoc

// getBalance

// getTransactions

// transferToken

// stakeCoin

// unstakeCoin

// getTransactionByHash

// createEventFilter

// createBlockFilter

// getFilterLogs

// getLogs

// getLatestBlock
5 changes: 5 additions & 0 deletions packages/cosm-r1/src/actions/walletActions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// sendTransaction

// simulateTransaction

// esitmateGasFee
1 change: 1 addition & 0 deletions packages/cosm-r1/src/chains.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// define chains
7 changes: 7 additions & 0 deletions packages/cosm-r1/src/client.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// createPublicClient

// createWalletClient -> public

// createIbcClient -> wallet | cosmwasm

// createCosmwasmClient - > wallet | ibc
Empty file added packages/cosm-r1/src/index.ts
Empty file.
9 changes: 9 additions & 0 deletions packages/cosm-r1/src/message.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// encode message

// encode raw transaction

// decode message

// decode raw transaction

// decode signature
3 changes: 3 additions & 0 deletions packages/cosm-r1/src/registry.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// create registry

// default registry
4 changes: 4 additions & 0 deletions packages/cosm-r1/src/transports.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// lcd api
// grpc
// rest api
// node rpc
10 changes: 1 addition & 9 deletions packages/cred-native/ios/Cosmr1CredentialHandlerModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class Cosmr1CredentialHandlerModule: Module {

// Sets constant properties on the module. Can take a dictionary or a closure that returns a dictionary.
Constants([
"PI": Double.pi
"PILLL": Double.pi
])

// Defines event names that the module can send to JavaScript.
Expand All @@ -32,13 +32,5 @@ public class Cosmr1CredentialHandlerModule: Module {
])
}

// Enables the module to be used as a native view. Definition components that are accepted as part of the
// view definition: Prop, Events.
View(Cosmr1CredentialHandlerView.self) {
// Defines a setter for the `name` prop.
Prop("name") { (view: Cosmr1CredentialHandlerView, prop: String) in
print(prop)
}
}
}
}

0 comments on commit 5993db7

Please sign in to comment.