@functionland/react-native-fula 1.0.0 → 1.1.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 (84) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +190 -133
  3. package/android/.gradle/7.5.1/checksums/checksums.lock +0 -0
  4. package/android/.gradle/7.5.1/checksums/md5-checksums.bin +0 -0
  5. package/android/.gradle/7.5.1/checksums/sha1-checksums.bin +0 -0
  6. package/android/.gradle/7.5.1/dependencies-accessors/dependencies-accessors.lock +0 -0
  7. package/android/.gradle/7.5.1/dependencies-accessors/gc.properties +0 -0
  8. package/android/.gradle/7.5.1/executionHistory/executionHistory.bin +0 -0
  9. package/android/.gradle/7.5.1/executionHistory/executionHistory.lock +0 -0
  10. package/android/.gradle/7.5.1/fileChanges/last-build.bin +0 -0
  11. package/android/.gradle/7.5.1/fileHashes/fileHashes.bin +0 -0
  12. package/android/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
  13. package/android/.gradle/7.5.1/fileHashes/resourceHashesCache.bin +0 -0
  14. package/android/.gradle/7.5.1/gc.properties +0 -0
  15. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  16. package/android/.gradle/buildOutputCleanup/cache.properties +2 -2
  17. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  18. package/android/.gradle/file-system.probe +0 -0
  19. package/android/.gradle/vcs-1/gc.properties +0 -0
  20. package/android/.idea/compiler.xml +5 -5
  21. package/android/.idea/gradle.xml +18 -17
  22. package/android/.idea/jarRepositories.xml +49 -44
  23. package/android/.idea/misc.xml +9 -9
  24. package/android/.idea/sonarlint/issuestore/index.pb +0 -0
  25. package/android/.idea/vcs.xml +5 -5
  26. package/android/build.gradle +69 -69
  27. package/android/gradle/wrapper/gradle-wrapper.properties +7 -7
  28. package/android/gradle.properties +1 -1
  29. package/android/gradlew +291 -375
  30. package/android/local.properties +8 -8
  31. package/android/src/main/AndroidManifest.xml +4 -4
  32. package/android/src/main/java/land/fx/fula/ConfigRef.java +7 -7
  33. package/android/src/main/java/land/fx/fula/Cryptography.java +47 -47
  34. package/android/src/main/java/land/fx/fula/FulaModule.java +1248 -701
  35. package/android/src/main/java/land/fx/fula/FulaPackage.java +2 -2
  36. package/android/src/main/java/land/fx/fula/SharedPreferenceHelper.java +65 -65
  37. package/android/src/main/java/land/fx/fula/StaticHelper.java +13 -13
  38. package/android/src/main/java/land/fx/fula/ThreadUtils.java +42 -42
  39. package/ios/FulaModule.h +10 -10
  40. package/ios/FulaModule.m +149 -149
  41. package/lib/commonjs/index.js +5 -1
  42. package/lib/commonjs/index.js.map +1 -1
  43. package/lib/commonjs/interfaces/api-lookup.js +1653 -0
  44. package/lib/commonjs/interfaces/api-lookup.js.map +1 -0
  45. package/lib/commonjs/interfaces/fulaNativeModule.js +1 -1
  46. package/lib/commonjs/interfaces/fulaNativeModule.js.map +1 -1
  47. package/lib/commonjs/protocols/blockchain.js +404 -0
  48. package/lib/commonjs/protocols/blockchain.js.map +1 -0
  49. package/lib/commonjs/protocols/chain-api.js +87 -0
  50. package/lib/commonjs/protocols/chain-api.js.map +1 -0
  51. package/lib/commonjs/protocols/fula.js +138 -82
  52. package/lib/commonjs/protocols/fula.js.map +1 -1
  53. package/lib/commonjs/types/blockchain.js +2 -0
  54. package/lib/commonjs/types/blockchain.js.map +1 -0
  55. package/lib/module/index.js +4 -0
  56. package/lib/module/index.js.map +1 -1
  57. package/lib/module/interfaces/api-lookup.js +1648 -0
  58. package/lib/module/interfaces/api-lookup.js.map +1 -0
  59. package/lib/module/interfaces/fulaNativeModule.js +1 -1
  60. package/lib/module/interfaces/fulaNativeModule.js.map +1 -1
  61. package/lib/module/protocols/blockchain.js +383 -0
  62. package/lib/module/protocols/blockchain.js.map +1 -0
  63. package/lib/module/protocols/chain-api.js +76 -0
  64. package/lib/module/protocols/chain-api.js.map +1 -0
  65. package/lib/module/protocols/fula.js +133 -81
  66. package/lib/module/protocols/fula.js.map +1 -1
  67. package/lib/module/types/blockchain.js +2 -0
  68. package/lib/module/types/blockchain.js.map +1 -0
  69. package/lib/typescript/index.d.ts +3 -1
  70. package/lib/typescript/interfaces/api-lookup.d.ts +1643 -0
  71. package/lib/typescript/interfaces/fulaNativeModule.d.ts +57 -28
  72. package/lib/typescript/protocols/blockchain.d.ts +17 -0
  73. package/lib/typescript/protocols/chain-api.d.ts +6 -0
  74. package/lib/typescript/protocols/fula.d.ts +127 -99
  75. package/lib/typescript/types/blockchain.d.ts +68 -0
  76. package/package.json +157 -149
  77. package/react-native-fula.podspec +19 -19
  78. package/src/index.tsx +3 -1
  79. package/src/interfaces/api-lookup.ts +1647 -0
  80. package/src/interfaces/fulaNativeModule.ts +85 -52
  81. package/src/protocols/blockchain.ts +460 -0
  82. package/src/protocols/chain-api.ts +80 -0
  83. package/src/protocols/fula.ts +283 -212
  84. package/src/types/blockchain.ts +81 -0
package/package.json CHANGED
@@ -1,149 +1,157 @@
1
- {
2
- "name": "@functionland/react-native-fula",
3
- "version": "1.0.0",
4
- "description": "This package is a bridge to use the Fula libp2p protocols in the react-native which is using wnfs",
5
- "main": "lib/commonjs/index",
6
- "module": "lib/module/index",
7
- "types": "lib/typescript/index.d.ts",
8
- "react-native": "src/index",
9
- "source": "src/index",
10
- "files": [
11
- "src",
12
- "lib",
13
- "android",
14
- "ios",
15
- "cpp",
16
- "!example/",
17
- "react-native-fula.podspec",
18
- "!lib/typescript/example",
19
- "!android/build",
20
- "!ios/build",
21
- "!**/__tests__",
22
- "!**/__fixtures__",
23
- "!**/__mocks__"
24
- ],
25
- "scripts": {
26
- "test": "jest",
27
- "typescript": "tsc --noEmit",
28
- "lint": "eslint \"**/*.{js,ts,tsx}\"",
29
- "prepare": "bob build",
30
- "release": "release-it",
31
- "example": "set NODE_OPTIONS=--openssl-legacy-provider && yarn --cwd example",
32
- "pods": "cd example && pod-install --quiet",
33
- "bootstrap": "yarn example && yarn && yarn pods"
34
- },
35
- "keywords": [
36
- "react-native",
37
- "ios",
38
- "android"
39
- ],
40
- "repository": "https://github.com/functionland/react-native-fula",
41
- "author": "Ehsan Shariati <ehsan6sha@gmail.com> (https://github.com/ehsan6sha)",
42
- "license": "MIT",
43
- "bugs": {
44
- "url": "https://github.com/functionland/react-native-fula/issues"
45
- },
46
- "homepage": "https://github.com/functionland/react-native-fula#readme",
47
- "publishConfig": {
48
- "registry": "https://registry.npmjs.org"
49
- },
50
- "devDependencies": {
51
- "@babel/plugin-proposal-export-namespace-from": "^7.16.7",
52
- "@commitlint/config-conventional": "^11.0.0",
53
- "@react-native-community/eslint-config": "^2.0.0",
54
- "@release-it/conventional-changelog": "^2.0.0",
55
- "@types/jest": "^26.0.0",
56
- "@types/react": "^16.9.19",
57
- "@types/react-native": "0.70.8",
58
- "commitlint": "^11.0.0",
59
- "eslint": "^7.2.0",
60
- "eslint-config-prettier": "^7.0.0",
61
- "eslint-plugin-prettier": "^3.1.3",
62
- "husky": "^6.0.0",
63
- "jest": "^26.0.1",
64
- "pod-install": "^0.1.0",
65
- "prettier": "^2.0.5",
66
- "react": "^18.1.0",
67
- "react-native": "0.70.6",
68
- "react-native-builder-bob": "^0.18.0",
69
- "release-it": "^14.2.2",
70
- "typescript": "^4.1.3"
71
- },
72
- "peerDependencies": {
73
- "react": "*",
74
- "react-native": "*"
75
- },
76
- "jest": {
77
- "preset": "react-native",
78
- "modulePathIgnorePatterns": [
79
- "<rootDir>/example/node_modules",
80
- "<rootDir>/lib/"
81
- ]
82
- },
83
- "commitlint": {
84
- "extends": [
85
- "@commitlint/config-conventional"
86
- ]
87
- },
88
- "release-it": {
89
- "git": {
90
- "commitMessage": "chore: release ${version}",
91
- "tagName": "v${version}"
92
- },
93
- "npm": {
94
- "publish": true
95
- },
96
- "github": {
97
- "release": true
98
- },
99
- "plugins": {
100
- "@release-it/conventional-changelog": {
101
- "preset": "angular"
102
- }
103
- }
104
- },
105
- "eslintConfig": {
106
- "root": true,
107
- "extends": [
108
- "@react-native-community",
109
- "prettier"
110
- ],
111
- "rules": {
112
- "prettier/prettier": [
113
- "error",
114
- {
115
- "quoteProps": "consistent",
116
- "singleQuote": true,
117
- "tabWidth": 2,
118
- "trailingComma": "es5",
119
- "useTabs": false
120
- }
121
- ]
122
- }
123
- },
124
- "eslintIgnore": [
125
- "node_modules/",
126
- "lib/"
127
- ],
128
- "prettier": {
129
- "quoteProps": "consistent",
130
- "singleQuote": true,
131
- "tabWidth": 2,
132
- "trailingComma": "es5",
133
- "useTabs": false
134
- },
135
- "react-native-builder-bob": {
136
- "source": "src",
137
- "output": "lib",
138
- "targets": [
139
- "commonjs",
140
- "module",
141
- [
142
- "typescript",
143
- {
144
- "project": "tsconfig.build.json"
145
- }
146
- ]
147
- ]
148
- }
149
- }
1
+ {
2
+ "name": "@functionland/react-native-fula",
3
+ "version": "1.1.4",
4
+ "description": "This package is a bridge to use the Fula libp2p protocols in the react-native which is using wnfs",
5
+ "main": "lib/commonjs/index",
6
+ "module": "lib/module/index",
7
+ "types": "lib/typescript/index.d.ts",
8
+ "react-native": "src/index",
9
+ "source": "src/index",
10
+ "files": [
11
+ "src",
12
+ "lib",
13
+ "android",
14
+ "ios",
15
+ "cpp",
16
+ "!example/",
17
+ "react-native-fula.podspec",
18
+ "!lib/typescript/example",
19
+ "!android/build",
20
+ "!ios/build",
21
+ "!**/__tests__",
22
+ "!**/__fixtures__",
23
+ "!**/__mocks__"
24
+ ],
25
+ "scripts": {
26
+ "test": "jest",
27
+ "typescript": "tsc --noEmit",
28
+ "lint": "eslint \"**/*.{js,ts,tsx}\"",
29
+ "prepare": "bob build",
30
+ "release": "release-it",
31
+ "example": "set NODE_OPTIONS=--openssl-legacy-provider && yarn --cwd example",
32
+ "pods": "cd example && pod-install --quiet",
33
+ "bootstrap": "yarn example && yarn && yarn pods"
34
+ },
35
+ "keywords": [
36
+ "react-native",
37
+ "ios",
38
+ "android"
39
+ ],
40
+ "repository": "https://github.com/functionland/react-native-fula",
41
+ "author": "Ehsan Shariati <ehsan6sha@gmail.com> (https://github.com/ehsan6sha)",
42
+ "license": "MIT",
43
+ "bugs": {
44
+ "url": "https://github.com/functionland/react-native-fula/issues"
45
+ },
46
+ "homepage": "https://github.com/functionland/react-native-fula#readme",
47
+ "publishConfig": {
48
+ "registry": "https://registry.npmjs.org"
49
+ },
50
+ "devDependencies": {
51
+ "@babel/plugin-proposal-export-namespace-from": "^7.16.7",
52
+ "@commitlint/config-conventional": "^11.0.0",
53
+ "@react-native-community/eslint-config": "^2.0.0",
54
+ "@release-it/conventional-changelog": "^2.0.0",
55
+ "@types/jest": "^26.0.0",
56
+ "@types/react": "^16.9.19",
57
+ "@types/react-native": "0.70.8",
58
+ "commitlint": "^11.0.0",
59
+ "eslint": "^7.2.0",
60
+ "eslint-config-prettier": "^7.0.0",
61
+ "eslint-plugin-prettier": "^3.1.3",
62
+ "husky": "^6.0.0",
63
+ "jest": "^26.0.1",
64
+ "pod-install": "^0.1.0",
65
+ "prettier": "^2.0.5",
66
+ "react": "^18.1.0",
67
+ "react-native": "0.70.6",
68
+ "react-native-builder-bob": "^0.18.0",
69
+ "release-it": "^14.2.2",
70
+ "typescript": "^4.1.3"
71
+ },
72
+ "peerDependencies": {
73
+ "@babel/core": "^7.0.0-0",
74
+ "@babel/preset-env": "^7.1.6",
75
+ "react": "*",
76
+ "react-native": "*"
77
+ },
78
+ "jest": {
79
+ "preset": "react-native",
80
+ "modulePathIgnorePatterns": [
81
+ "<rootDir>/example/node_modules",
82
+ "<rootDir>/lib/"
83
+ ]
84
+ },
85
+ "commitlint": {
86
+ "extends": [
87
+ "@commitlint/config-conventional"
88
+ ]
89
+ },
90
+ "release-it": {
91
+ "git": {
92
+ "commitMessage": "chore: release ${version}",
93
+ "tagName": "v${version}"
94
+ },
95
+ "npm": {
96
+ "publish": true
97
+ },
98
+ "github": {
99
+ "release": true
100
+ },
101
+ "plugins": {
102
+ "@release-it/conventional-changelog": {
103
+ "preset": "angular"
104
+ }
105
+ }
106
+ },
107
+ "eslintConfig": {
108
+ "root": true,
109
+ "extends": [
110
+ "@react-native-community",
111
+ "prettier"
112
+ ],
113
+ "rules": {
114
+ "prettier/prettier": [
115
+ "error",
116
+ {
117
+ "quoteProps": "consistent",
118
+ "singleQuote": true,
119
+ "tabWidth": 2,
120
+ "trailingComma": "es5",
121
+ "useTabs": false
122
+ }
123
+ ]
124
+ }
125
+ },
126
+ "eslintIgnore": [
127
+ "node_modules/",
128
+ "lib/"
129
+ ],
130
+ "prettier": {
131
+ "quoteProps": "consistent",
132
+ "singleQuote": true,
133
+ "tabWidth": 2,
134
+ "trailingComma": "es5",
135
+ "useTabs": false
136
+ },
137
+ "react-native-builder-bob": {
138
+ "source": "src",
139
+ "output": "lib",
140
+ "targets": [
141
+ "commonjs",
142
+ "module",
143
+ [
144
+ "typescript",
145
+ {
146
+ "project": "tsconfig.build.json"
147
+ }
148
+ ]
149
+ ]
150
+ },
151
+ "dependencies": {
152
+ "@polkadot/api": "^9.11.3",
153
+ "@polkadot/keyring": "^10.2.6",
154
+ "@polkadot/util": "^10.2.6",
155
+ "@polkadot/util-crypto": "^10.2.6"
156
+ }
157
+ }
@@ -1,19 +1,19 @@
1
- require "json"
2
-
3
- package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4
-
5
- Pod::Spec.new do |s|
6
- s.name = "react-native-fula"
7
- s.version = package["version"]
8
- s.summary = package["description"]
9
- s.homepage = package["homepage"]
10
- s.license = package["license"]
11
- s.authors = package["author"]
12
-
13
- s.platforms = { :ios => "10.0" }
14
- s.source = { :git => "https://github.com/functionland/react-native-fula.git", :tag => "#{s.version}" }
15
-
16
- s.source_files = "ios/**/*.{h,m,mm}"
17
- s.dependency "React-Core"
18
- s.dependency 'Mobile','~> 0.0.3'
19
- end
1
+ require "json"
2
+
3
+ package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4
+
5
+ Pod::Spec.new do |s|
6
+ s.name = "react-native-fula"
7
+ s.version = package["version"]
8
+ s.summary = package["description"]
9
+ s.homepage = package["homepage"]
10
+ s.license = package["license"]
11
+ s.authors = package["author"]
12
+
13
+ s.platforms = { :ios => "10.0" }
14
+ s.source = { :git => "https://github.com/functionland/react-native-fula.git", :tag => "#{s.version}" }
15
+
16
+ s.source_files = "ios/**/*.{h,m,mm}"
17
+ s.dependency "React-Core"
18
+ s.dependency 'Mobile','~> 0.0.3'
19
+ end
package/src/index.tsx CHANGED
@@ -1 +1,3 @@
1
- export * as fula from './protocols/fula';
1
+ export * as fula from './protocols/fula';
2
+ export * as blockchain from './protocols/blockchain';
3
+ export * as chainApi from './protocols/chain-api';