@functionland/react-native-fula 1.14.2 → 1.14.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/LICENSE +20 -21
  2. package/android/build.gradle +90 -50
  3. package/android/gradle.properties +5 -1
  4. package/android/src/main/AndroidManifest.xml +3 -4
  5. package/android/src/main/AndroidManifestNew.xml +2 -0
  6. package/android/src/main/java/land/fx/fula/ConfigRef.java +7 -7
  7. package/android/src/main/java/land/fx/fula/Cryptography.java +62 -62
  8. package/android/src/main/java/land/fx/fula/FulaModule.java +1466 -1466
  9. package/android/src/main/java/land/fx/fula/FulaPackage.java +32 -32
  10. package/android/src/main/java/land/fx/fula/SharedPreferenceHelper.java +65 -65
  11. package/android/src/main/java/land/fx/fula/StaticHelper.java +13 -13
  12. package/android/src/main/java/land/fx/fula/ThreadUtils.java +42 -42
  13. package/ios/Cryptography.swift +36 -0
  14. package/ios/Fula-Bridging-Header.h +3 -0
  15. package/ios/Fula.mm +199 -0
  16. package/ios/Fula.swift +1152 -0
  17. package/ios/{FulaModule.xcodeproj → Fula.xcodeproj}/project.pbxproj +38 -16
  18. package/ios/Fula.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  19. package/ios/Fula.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  20. package/ios/Fula.xcodeproj/project.xcworkspace/xcuserdata/user246549.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  21. package/ios/Fula.xcodeproj/xcuserdata/user246549.xcuserdatad/xcschemes/xcschememanagement.plist +14 -0
  22. package/ios/UserDataHelper.swift +143 -0
  23. package/lib/commonjs/index.js.map +1 -1
  24. package/lib/commonjs/interfaces/api-lookup.js +266 -266
  25. package/lib/commonjs/interfaces/api-lookup.js.map +1 -1
  26. package/lib/commonjs/interfaces/fulaNativeModule.js.map +1 -1
  27. package/lib/commonjs/protocols/blockchain.js +64 -64
  28. package/lib/commonjs/protocols/blockchain.js.map +1 -1
  29. package/lib/commonjs/protocols/chain-api.js +10 -0
  30. package/lib/commonjs/protocols/chain-api.js.map +1 -1
  31. package/lib/commonjs/protocols/fula.js +99 -99
  32. package/lib/commonjs/protocols/fula.js.map +1 -1
  33. package/lib/commonjs/protocols/fxblox.js +3 -3
  34. package/lib/commonjs/protocols/fxblox.js.map +1 -1
  35. package/lib/commonjs/types/blockchain.js.map +1 -1
  36. package/lib/commonjs/types/fxblox.js.map +1 -1
  37. package/lib/module/index.js +4 -8
  38. package/lib/module/index.js.map +1 -1
  39. package/lib/module/interfaces/api-lookup.js +266 -266
  40. package/lib/module/interfaces/api-lookup.js.map +1 -1
  41. package/lib/module/interfaces/fulaNativeModule.js.map +1 -1
  42. package/lib/module/protocols/blockchain.js +64 -64
  43. package/lib/module/protocols/blockchain.js.map +1 -1
  44. package/lib/module/protocols/chain-api.js +8 -0
  45. package/lib/module/protocols/chain-api.js.map +1 -1
  46. package/lib/module/protocols/fula.js +99 -99
  47. package/lib/module/protocols/fula.js.map +1 -1
  48. package/lib/module/protocols/fxblox.js +3 -3
  49. package/lib/module/protocols/fxblox.js.map +1 -1
  50. package/lib/module/types/blockchain.js.map +1 -1
  51. package/lib/module/types/fxblox.js.map +1 -1
  52. package/lib/typescript/index.d.ts +5 -4
  53. package/lib/typescript/index.d.ts.map +1 -0
  54. package/lib/typescript/interfaces/api-lookup.d.ts +1644 -1643
  55. package/lib/typescript/interfaces/api-lookup.d.ts.map +1 -0
  56. package/lib/typescript/interfaces/fulaNativeModule.d.ts +62 -61
  57. package/lib/typescript/interfaces/fulaNativeModule.d.ts.map +1 -0
  58. package/lib/typescript/protocols/blockchain.d.ts +18 -17
  59. package/lib/typescript/protocols/blockchain.d.ts.map +1 -0
  60. package/lib/typescript/protocols/chain-api.d.ts +7 -6
  61. package/lib/typescript/protocols/chain-api.d.ts.map +1 -0
  62. package/lib/typescript/protocols/fula.d.ts +132 -131
  63. package/lib/typescript/protocols/fula.d.ts.map +1 -0
  64. package/lib/typescript/protocols/fxblox.d.ts +8 -7
  65. package/lib/typescript/protocols/fxblox.d.ts.map +1 -0
  66. package/lib/typescript/types/blockchain.d.ts +69 -68
  67. package/lib/typescript/types/blockchain.d.ts.map +1 -0
  68. package/lib/typescript/types/fxblox.d.ts +9 -8
  69. package/lib/typescript/types/fxblox.d.ts.map +1 -0
  70. package/package.json +43 -28
  71. package/react-native-fula.podspec +47 -19
  72. package/src/index.tsx +4 -4
  73. package/src/interfaces/api-lookup.ts +1647 -1647
  74. package/src/interfaces/fulaNativeModule.ts +122 -122
  75. package/src/protocols/blockchain.ts +504 -504
  76. package/src/protocols/chain-api.ts +8 -0
  77. package/src/protocols/fula.ts +314 -314
  78. package/src/protocols/fxblox.ts +49 -49
  79. package/src/types/blockchain.ts +80 -80
  80. package/src/types/fxblox.ts +8 -8
  81. package/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
  82. package/android/.gradle/7.5.1/checksums/md5-checksums.bin +0 -0
  83. package/android/.gradle/7.5.1/checksums/sha1-checksums.bin +0 -0
  84. package/android/.gradle/7.5.1/dependencies-accessors/dependencies-accessors.lock +0 -0
  85. package/android/.gradle/7.5.1/dependencies-accessors/gc.properties +0 -0
  86. package/android/.gradle/7.5.1/executionHistory/executionHistory.bin +0 -0
  87. package/android/.gradle/7.5.1/executionHistory/executionHistory.lock +0 -0
  88. package/android/.gradle/7.5.1/fileChanges/last-build.bin +0 -0
  89. package/android/.gradle/7.5.1/fileHashes/fileHashes.bin +0 -0
  90. package/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
  91. package/android/.gradle/7.5.1/fileHashes/resourceHashesCache.bin +0 -0
  92. package/android/.gradle/7.5.1/gc.properties +0 -0
  93. package/android/.gradle/7.6/checksums/checksums.lock +0 -0
  94. package/android/.gradle/7.6/checksums/md5-checksums.bin +0 -0
  95. package/android/.gradle/7.6/checksums/sha1-checksums.bin +0 -0
  96. package/android/.gradle/7.6/dependencies-accessors/dependencies-accessors.lock +0 -0
  97. package/android/.gradle/7.6/dependencies-accessors/gc.properties +0 -0
  98. package/android/.gradle/7.6/executionHistory/executionHistory.bin +0 -0
  99. package/android/.gradle/7.6/executionHistory/executionHistory.lock +0 -0
  100. package/android/.gradle/7.6/fileChanges/last-build.bin +0 -0
  101. package/android/.gradle/7.6/fileHashes/fileHashes.bin +0 -0
  102. package/android/.gradle/7.6/fileHashes/fileHashes.lock +0 -0
  103. package/android/.gradle/7.6/fileHashes/resourceHashesCache.bin +0 -0
  104. package/android/.gradle/7.6/gc.properties +0 -0
  105. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  106. package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
  107. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  108. package/android/.gradle/file-system.probe +0 -0
  109. package/android/.gradle/vcs-1/gc.properties +0 -0
  110. package/android/.idea/compiler.xml +0 -6
  111. package/android/.idea/gradle.xml +0 -20
  112. package/android/.idea/jarRepositories.xml +0 -50
  113. package/android/.idea/misc.xml +0 -10
  114. package/android/.idea/sonarlint/issuestore/2/a/2afbb999f001938c88fa43fc2ef52abf0f8213e4 +0 -0
  115. package/android/.idea/sonarlint/issuestore/2/e/2e09eb0f0df666781fdff057a0af6101364ebe2f +0 -0
  116. package/android/.idea/sonarlint/issuestore/6/2/62149c3f7c3a14d7a77778e558d274e8c00a5585 +0 -0
  117. package/android/.idea/sonarlint/issuestore/8/0/80a78d662b0659428eb880336106c3c5fc3f0714 +0 -0
  118. package/android/.idea/sonarlint/issuestore/d/2/d2865ef8fc01c40e9fd82977fde2c8378fad0b12 +0 -0
  119. package/android/.idea/sonarlint/issuestore/f/b/fbe448ebfc3eb2d4e308f6b8b043666f5b57235e +0 -0
  120. package/android/.idea/sonarlint/issuestore/index.pb +0 -13
  121. package/android/.idea/sonarlint/securityhotspotstore/2/a/2afbb999f001938c88fa43fc2ef52abf0f8213e4 +0 -0
  122. package/android/.idea/sonarlint/securityhotspotstore/2/e/2e09eb0f0df666781fdff057a0af6101364ebe2f +0 -0
  123. package/android/.idea/sonarlint/securityhotspotstore/6/2/62149c3f7c3a14d7a77778e558d274e8c00a5585 +0 -0
  124. package/android/.idea/sonarlint/securityhotspotstore/8/0/80a78d662b0659428eb880336106c3c5fc3f0714 +0 -0
  125. package/android/.idea/sonarlint/securityhotspotstore/d/2/d2865ef8fc01c40e9fd82977fde2c8378fad0b12 +0 -0
  126. package/android/.idea/sonarlint/securityhotspotstore/f/b/fbe448ebfc3eb2d4e308f6b8b043666f5b57235e +0 -0
  127. package/android/.idea/sonarlint/securityhotspotstore/index.pb +0 -13
  128. package/android/.idea/vcs.xml +0 -6
  129. package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  130. package/android/gradle/wrapper/gradle-wrapper.properties +0 -7
  131. package/android/gradlew +0 -291
  132. package/android/gradlew.bat +0 -91
  133. package/android/local.properties +0 -8
  134. package/ios/FulaModule.h +0 -10
  135. package/ios/FulaModule.m +0 -149
package/android/gradlew DELETED
@@ -1,291 +0,0 @@
1
- #!/bin/sh
2
-
3
- #
4
- # Copyright © 2015-2021 the original authors.
5
- # Copyright © 2015-2021 the original authors.
6
- #
7
- # Licensed under the Apache License, Version 2.0 (the "License");
8
- # you may not use this file except in compliance with the License.
9
- # You may obtain a copy of the License at
10
- #
11
- # https://www.apache.org/licenses/LICENSE-2.0
12
- #
13
- # Unless required by applicable law or agreed to in writing, software
14
- # distributed under the License is distributed on an "AS IS" BASIS,
15
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- # See the License for the specific language governing permissions and
17
- # limitations under the License.
18
- #
19
-
20
- ##############################################################################
21
- #
22
- # Gradle start up script for POSIX generated by Gradle.
23
- #
24
- # Important for running:
25
- #
26
- # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
27
- # noncompliant, but you have some other compliant shell such as ksh or
28
- # bash, then to run this script, type that shell name before the whole
29
- # command line, like:
30
- #
31
- # ksh Gradle
32
- #
33
- # Busybox and similar reduced shells will NOT work, because this script
34
- # requires all of these POSIX shell features:
35
- # * functions;
36
- # * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
37
- # «${var#prefix}», «${var%suffix}», and «$( cmd )»;
38
- # * compound commands having a testable exit status, especially «case»;
39
- # * various built-in commands including «command», «set», and «ulimit».
40
- #
41
- # Important for patching:
42
- #
43
- # (2) This script targets any POSIX shell, so it avoids extensions provided
44
- # by Bash, Ksh, etc; in particular arrays are avoided.
45
- #
46
- # The "traditional" practice of packing multiple parameters into a
47
- # space-separated string is a well documented source of bugs and security
48
- # problems, so this is (mostly) avoided, by progressively accumulating
49
- # options in "$@", and eventually passing that to Java.
50
- #
51
- # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
52
- # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
53
- # see the in-line comments for details.
54
- #
55
- # There are tweaks for specific operating systems such as AIX, CygWin,
56
- # Darwin, MinGW, and NonStop.
57
- #
58
- # (3) This script is generated from the Groovy template
59
- # https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
60
- # within the Gradle project.
61
- #
62
- # You can find Gradle at https://github.com/gradle/gradle/.
63
- #
64
- #
65
- # Gradle start up script for POSIX generated by Gradle.
66
- #
67
- # Important for running:
68
- #
69
- # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
70
- # noncompliant, but you have some other compliant shell such as ksh or
71
- # bash, then to run this script, type that shell name before the whole
72
- # command line, like:
73
- #
74
- # ksh Gradle
75
- #
76
- # Busybox and similar reduced shells will NOT work, because this script
77
- # requires all of these POSIX shell features:
78
- # * functions;
79
- # * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
80
- # «${var#prefix}», «${var%suffix}», and «$( cmd )»;
81
- # * compound commands having a testable exit status, especially «case»;
82
- # * various built-in commands including «command», «set», and «ulimit».
83
- #
84
- # Important for patching:
85
- #
86
- # (2) This script targets any POSIX shell, so it avoids extensions provided
87
- # by Bash, Ksh, etc; in particular arrays are avoided.
88
- #
89
- # The "traditional" practice of packing multiple parameters into a
90
- # space-separated string is a well documented source of bugs and security
91
- # problems, so this is (mostly) avoided, by progressively accumulating
92
- # options in "$@", and eventually passing that to Java.
93
- #
94
- # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
95
- # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
96
- # see the in-line comments for details.
97
- #
98
- # There are tweaks for specific operating systems such as AIX, CygWin,
99
- # Darwin, MinGW, and NonStop.
100
- #
101
- # (3) This script is generated from the Groovy template
102
- # https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
103
- # within the Gradle project.
104
- #
105
- # You can find Gradle at https://github.com/gradle/gradle/.
106
- #
107
- ##############################################################################
108
-
109
- # Attempt to set APP_HOME
110
-
111
-
112
- # Resolve links: $0 may be a link
113
- app_path=$0
114
-
115
- # Need this for daisy-chained symlinks.
116
- while
117
- APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
118
- [ -h "$app_path" ]
119
- do
120
- ls=$( ls -ld "$app_path" )
121
- link=${ls#*' -> '}
122
- case $link in #(
123
- /*) app_path=$link ;; #(
124
- *) app_path=$APP_HOME$link ;;
125
- esac
126
- done
127
- app_path=$0
128
-
129
-
130
- APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
131
-
132
- APP_NAME="Gradle"
133
- APP_BASE_NAME=${0##*/}
134
-
135
- # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
136
- DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
137
-
138
- # Use the maximum available, or set MAX_FD != -1 to use that value.
139
- MAX_FD=maximum
140
- MAX_FD=maximum
141
-
142
- warn () {
143
- echo "$*"
144
- } >&2
145
-
146
- die () {
147
- echo
148
- echo "$*"
149
- echo
150
- exit 1
151
- } >&2
152
-
153
- # OS specific support (must be 'true' or 'false').
154
- cygwin=false
155
- msys=false
156
- darwin=false
157
- nonstop=false
158
- case "$( uname )" in #(
159
- CYGWIN* ) cygwin=true ;; #(
160
- Darwin* ) darwin=true ;; #(
161
- MSYS* | MINGW* ) msys=true ;; #(
162
- NONSTOP* ) nonstop=true ;;
163
- esac
164
-
165
- CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
166
-
167
-
168
-
169
- # Determine the Java command to use to start the JVM.
170
- if [ -n "$JAVA_HOME" ] ; then
171
- if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
172
- # IBM's JDK on AIX uses strange locations for the executables
173
- JAVACMD=$JAVA_HOME/jre/sh/java
174
- JAVACMD=$JAVA_HOME/jre/sh/java
175
- else
176
- JAVACMD=$JAVA_HOME/bin/java
177
- JAVACMD=$JAVA_HOME/bin/java
178
- fi
179
- if [ ! -x "$JAVACMD" ] ; then
180
- die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
181
-
182
- Please set the JAVA_HOME variable in your environment to match the
183
- location of your Java installation."
184
- fi
185
- else
186
- JAVACMD=java
187
- which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
188
-
189
- Please set the JAVA_HOME variable in your environment to match the
190
- location of your Java installation."
191
- fi
192
-
193
- # Increase the maximum file descriptors if we can.
194
- if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
195
- case $MAX_FD in #(
196
- max*)
197
- MAX_FD=$( ulimit -H -n ) ||
198
- warn "Could not query maximum file descriptor limit"
199
- esac
200
- case $MAX_FD in #(
201
- '' | soft) :;; #(
202
- *)
203
- ulimit -n "$MAX_FD" ||
204
- warn "Could not set maximum file descriptor limit to $MAX_FD"
205
- esac
206
- fi
207
-
208
- # Collect all arguments for the java command, stacking in reverse order:
209
- # * args from the command line
210
- # * the main class name
211
- # * -classpath
212
- # * -D...appname settings
213
- # * --module-path (only if needed)
214
- # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
215
-
216
- # For Cygwin or MSYS, switch paths to Windows format before running java
217
- if "$cygwin" || "$msys" ; then
218
- APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
219
- CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
220
-
221
- JAVACMD=$( cygpath --unix "$JAVACMD" )
222
-
223
- # Now convert the arguments - kludge to limit ourselves to /bin/sh
224
- for arg do
225
- if
226
- case $arg in #(
227
- -*) false ;; # don't mess with options #(
228
- /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
229
- [ -e "$t" ] ;; #(
230
- *) false ;;
231
- esac
232
- then
233
- arg=$( cygpath --path --ignore --mixed "$arg" )
234
- fi
235
- # Roll the args list around exactly as many times as the number of
236
- # args, so each arg winds up back in the position where it started, but
237
- # possibly modified.
238
- #
239
- # NB: a `for` loop captures its iteration list before it begins, so
240
- # changing the positional parameters here affects neither the number of
241
- # iterations, nor the values presented in `arg`.
242
- shift # remove old arg
243
- set -- "$@" "$arg" # push replacement arg
244
- done
245
- fi
246
-
247
- # Collect all arguments for the java command;
248
- # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
249
- # shell script including quotes and variable substitutions, so put them in
250
- # double quotes to make sure that they get re-expanded; and
251
- # * put everything else in single quotes, so that it's not re-expanded.
252
-
253
- set -- \
254
- "-Dorg.gradle.appname=$APP_BASE_NAME" \
255
- -classpath "$CLASSPATH" \
256
- org.gradle.wrapper.GradleWrapperMain \
257
- "$@"
258
-
259
- # Stop when "xargs" is not available.
260
- if ! command -v xargs >/dev/null 2>&1
261
- then
262
- die "xargs is not available"
263
- fi
264
-
265
-
266
- # Use "xargs" to parse quoted args.
267
- #
268
- # With -n1 it outputs one arg per line, with the quotes and backslashes removed.
269
- #
270
- # In Bash we could simply go:
271
- #
272
- # readarray ARGS < <( xargs -n1 <<<"$var" ) &&
273
- # set -- "${ARGS[@]}" "$@"
274
- #
275
- # but POSIX shell has neither arrays nor command substitution, so instead we
276
- # post-process each arg (as a line of input to sed) to backslash-escape any
277
- # character that might be a shell metacharacter, then use eval to reverse
278
- # that process (while maintaining the separation between arguments), and wrap
279
- # the whole thing up as a single "set" statement.
280
- #
281
- # This will of course break if any of these variables contains a newline or
282
- # an unmatched quote.
283
- #
284
-
285
- eval "set -- $(
286
- printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
287
- xargs -n1 |
288
- sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
289
- tr '\n' ' '
290
- )" '"$@"'
291
- exec "$JAVACMD" "$@"
@@ -1,91 +0,0 @@
1
- @rem
2
- @rem Copyright 2015 the original author or authors.
3
- @rem
4
- @rem Licensed under the Apache License, Version 2.0 (the "License");
5
- @rem you may not use this file except in compliance with the License.
6
- @rem You may obtain a copy of the License at
7
- @rem
8
- @rem https://www.apache.org/licenses/LICENSE-2.0
9
- @rem
10
- @rem Unless required by applicable law or agreed to in writing, software
11
- @rem distributed under the License is distributed on an "AS IS" BASIS,
12
- @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- @rem See the License for the specific language governing permissions and
14
- @rem limitations under the License.
15
- @rem
16
-
17
- @if "%DEBUG%"=="" @echo off
18
- @rem ##########################################################################
19
- @rem
20
- @rem Gradle startup script for Windows
21
- @rem
22
- @rem ##########################################################################
23
-
24
- @rem Set local scope for the variables with windows NT shell
25
- if "%OS%"=="Windows_NT" setlocal
26
-
27
- set DIRNAME=%~dp0
28
- if "%DIRNAME%"=="" set DIRNAME=.
29
- set APP_BASE_NAME=%~n0
30
- set APP_HOME=%DIRNAME%
31
-
32
- @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33
- for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34
-
35
- @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36
- set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37
-
38
- @rem Find java.exe
39
- if defined JAVA_HOME goto findJavaFromJavaHome
40
-
41
- set JAVA_EXE=java.exe
42
- %JAVA_EXE% -version >NUL 2>&1
43
- if %ERRORLEVEL% equ 0 goto execute
44
-
45
- echo.
46
- echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47
- echo.
48
- echo Please set the JAVA_HOME variable in your environment to match the
49
- echo location of your Java installation.
50
-
51
- goto fail
52
-
53
- :findJavaFromJavaHome
54
- set JAVA_HOME=%JAVA_HOME:"=%
55
- set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56
-
57
- if exist "%JAVA_EXE%" goto execute
58
-
59
- echo.
60
- echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61
- echo.
62
- echo Please set the JAVA_HOME variable in your environment to match the
63
- echo location of your Java installation.
64
-
65
- goto fail
66
-
67
- :execute
68
- @rem Setup the command line
69
-
70
- set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71
-
72
-
73
- @rem Execute Gradle
74
- "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75
-
76
- :end
77
- @rem End local scope for the variables with windows NT shell
78
- if %ERRORLEVEL% equ 0 goto mainEnd
79
-
80
- :fail
81
- rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82
- rem the _cmd.exe /c_ return code!
83
- set EXIT_CODE=%ERRORLEVEL%
84
- if %EXIT_CODE% equ 0 set EXIT_CODE=1
85
- if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
86
- exit /b %EXIT_CODE%
87
-
88
- :mainEnd
89
- if "%OS%"=="Windows_NT" endlocal
90
-
91
- :omega
@@ -1,8 +0,0 @@
1
- ## This file must *NOT* be checked into Version Control Systems,
2
- # as it contains information specific to your local configuration.
3
- #
4
- # Location of the SDK. This is only used by Gradle.
5
- # For customization when using a Version Control System, please read the
6
- # header note.
7
- #Sat Dec 17 19:59:53 EST 2022
8
- sdk.dir=C\:\\Users\\ehsan\\AppData\\Local\\Android\\Sdk
package/ios/FulaModule.h DELETED
@@ -1,10 +0,0 @@
1
- #import <React/RCTBridgeModule.h>
2
- #import <Mobile/Mobile.h>
3
-
4
- @interface FulaModule : NSObject <RCTBridgeModule> {
5
- MobileFula *fula;
6
- }
7
-
8
- - (MobileFula *) fula;
9
-
10
- @end
package/ios/FulaModule.m DELETED
@@ -1,149 +0,0 @@
1
- #import <React/RCTLog.h>
2
- #import "FulaModule.h"
3
- #import <Mobile/Mobile.h>
4
-
5
- @implementation FulaModule
6
-
7
- RCT_EXPORT_MODULE()
8
-
9
- - (id) init {
10
- self = [super init];
11
- NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
12
-
13
- //Get the docs directory
14
- NSString *documentsDirectoryPath = [paths objectAtIndex:0];
15
- NSString *folderPath = [documentsDirectoryPath stringByAppendingPathComponent:@"fula"];
16
-
17
- if (![[NSFileManager defaultManager] fileExistsAtPath:folderPath])
18
- [[NSFileManager defaultManager] createDirectoryAtPath:folderPath withIntermediateDirectories:true attributes:nil error:nil];
19
-
20
- fula = [[MobileFula alloc] init:folderPath];
21
- return self;
22
- }
23
-
24
- RCT_REMAP_METHOD(addBox,
25
- addBox:(nonnull NSString*)boxAddr
26
- withResolver:(RCTPromiseResolveBlock)resolve
27
- withRejecter:(RCTPromiseRejectBlock)reject)
28
- {
29
- NSError *error = nil;
30
- BOOL result= [fula addBox:boxAddr error:&error];
31
- if(error) {
32
- NSLog(@"addBox error: %@",error);
33
- reject(@"addBox_failure", @"error", error);
34
- return;
35
- }
36
- NSNumber *output = [NSNumber numberWithBool:result];
37
- resolve(output);
38
- }
39
-
40
- RCT_REMAP_METHOD(send,
41
- send:(nonnull NSString*)filePath
42
- withResolver:(RCTPromiseResolveBlock)resolve
43
- withRejecter:(RCTPromiseRejectBlock)reject)
44
- {
45
- NSError *error = nil;
46
- NSString *result= [fula send:filePath error:&error];
47
-
48
- if(error) {
49
- NSLog(@"send error: %@",error);
50
- reject(@"send_failure", @"error", error);
51
- return;
52
- }
53
- resolve(result);
54
- }
55
-
56
- RCT_REMAP_METHOD(encryptSend,
57
- encryptSend:(nonnull NSString*)filePath
58
- withResolver:(RCTPromiseResolveBlock)resolve
59
- withRejecter:(RCTPromiseRejectBlock)reject)
60
- {
61
- NSError *error = nil;
62
- NSString *result= [fula encryptSend:filePath error:&error];
63
-
64
- if(error) {
65
- NSLog(@"encryptSend error: %@",error);
66
- reject(@"encryptSend_failure", @"error", error);
67
- return;
68
- }
69
- resolve(result);
70
- }
71
- RCT_REMAP_METHOD(receiveFile,
72
- receiveFile:(nonnull NSString*)fileId
73
- withFileName:(nonnull NSString*)fileName
74
- withResolver:(RCTPromiseResolveBlock)resolve
75
- withRejecter:(RCTPromiseRejectBlock)reject)
76
- {
77
- NSError *error = nil;
78
- NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
79
-
80
- //Get the docs directory
81
- NSString *documentsDirectoryPath = [paths objectAtIndex:0];
82
- NSString *folderPath = [documentsDirectoryPath stringByAppendingPathComponent:@"fula/received"];
83
- NSString *filePath= [folderPath stringByAppendingPathComponent:fileName];
84
-
85
- if (![[NSFileManager defaultManager] fileExistsAtPath:folderPath])
86
- [[NSFileManager defaultManager] createDirectoryAtPath:folderPath withIntermediateDirectories:true attributes:nil error:nil];
87
-
88
- BOOL result= [fula receiveFile:fileId filePath:filePath error:&error];
89
-
90
- if(error) {
91
- NSLog(@"receiveFile error: %@",error);
92
- reject(@"receiveFile_failure", @"error", error);
93
- return;
94
- }
95
- if(!result){
96
- resolve(nil);
97
- }
98
-
99
- resolve(filePath);
100
- }
101
-
102
- RCT_REMAP_METHOD(receiveFileInfo,
103
- receiveFileInfo:(nonnull NSString*)fileId
104
- withResolver:(RCTPromiseResolveBlock)resolve
105
- withRejecter:(RCTPromiseRejectBlock)reject)
106
- {
107
- NSError *error = nil;
108
- NSString* result= [fula receiveFileInfo:fileId error:&error];
109
-
110
- if(error) {
111
- NSLog(@"receiveFileInfo error: %@",error);
112
- reject(@"receiveFileInfo_failure", @"error", error);
113
- return;
114
- }
115
-
116
- resolve(result);
117
- }
118
-
119
- RCT_REMAP_METHOD(receiveDecryptFile,
120
- receiveDecryptFile:(nonnull NSString*)ref
121
- withFileName:(nonnull NSString*)fileName
122
- withResolver:(RCTPromiseResolveBlock)resolve
123
- withRejecter:(RCTPromiseRejectBlock)reject)
124
- {
125
- NSError *error = nil;
126
- NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
127
-
128
- //Get the docs directory
129
- NSString *documentsDirectoryPath = [paths objectAtIndex:0];
130
- NSString *folderPath = [documentsDirectoryPath stringByAppendingPathComponent:@"fula/received"];
131
- NSString *filePath= [folderPath stringByAppendingPathComponent:fileName];
132
-
133
- if (![[NSFileManager defaultManager] fileExistsAtPath:folderPath])
134
- [[NSFileManager defaultManager] createDirectoryAtPath:folderPath withIntermediateDirectories:true attributes:nil error:nil];
135
-
136
- BOOL result= [fula receiveDecryptFile:ref filePath:filePath error:&error];
137
-
138
- if(error) {
139
- NSLog(@"receiveDecryptFile error: %@",error);
140
- reject(@"receiveDecryptFile_failure", @"error", error);
141
- return;
142
- }
143
- if(!result){
144
- resolve(nil);
145
- }
146
- resolve(filePath);
147
- }
148
-
149
- @end