@functionland/react-native-fula 1.19.0 → 1.20.0

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.
@@ -31,12 +31,12 @@ const disconnectApi = async api => {
31
31
  await api.disconnect();
32
32
  };
33
33
 
34
- /*function addDoubleSlashToSeed(seed: string): string {
35
- return seed.startsWith('//') ? seed : '//' + seed;
34
+ /*function addDoubleSlashToSeed(seed: string): string {
35
+ return seed.startsWith('//') ? seed : '//' + seed;
36
36
  }*/
37
37
 
38
- /*
39
- createManifest: This function batch uploads manifests
38
+ /*
39
+ createManifest: This function batch uploads manifests
40
40
  */
41
41
  exports.disconnectApi = disconnectApi;
42
42
  function serialize(obj) {
@@ -133,8 +133,8 @@ const batchUploadManifest = async function (api, seed, cids_i, poolId_i) {
133
133
  }
134
134
  };
135
135
 
136
- /*
137
- listPools: This function takes start index and length and returns a promise of an object that contains a list of pools. Each pool in the list contains the poolID, owner, poolName, parent, and participants of the pool
136
+ /*
137
+ listPools: This function takes start index and length and returns a promise of an object that contains a list of pools. Each pool in the list contains the poolID, owner, poolName, parent, and participants of the pool
138
138
  */
139
139
  exports.batchUploadManifest = batchUploadManifest;
140
140
  const listPools = async function (api) {
@@ -174,8 +174,8 @@ const listPools = async function (api) {
174
174
  }
175
175
  };
176
176
 
177
- /*
178
- checkJoinRequest: This function takes poolId and AccontId and returns a promise of an object that contains request to the pools.
177
+ /*
178
+ checkJoinRequest: This function takes poolId and AccontId and returns a promise of an object that contains request to the pools.
179
179
  */
180
180
  exports.listPools = listPools;
181
181
  const checkJoinRequest = async (api, poolId, accountId) => {
@@ -203,8 +203,8 @@ exports.checkJoinRequest = checkJoinRequest;
203
203
  function isAccountInfo(obj) {
204
204
  return 'data' in obj && 'free' in obj.data;
205
205
  }
206
- /*
207
- checkAccountExsists: This function takes accountId and checks if the account exists
206
+ /*
207
+ checkAccountExsists: This function takes accountId and checks if the account exists
208
208
  */
209
209
  const checkAccountBalance = async (api, accountId) => {
210
210
  console.log('checkAcocuntExsists in react-native started');
@@ -23,12 +23,12 @@ export const disconnectApi = async api => {
23
23
  await api.disconnect();
24
24
  };
25
25
 
26
- /*function addDoubleSlashToSeed(seed: string): string {
27
- return seed.startsWith('//') ? seed : '//' + seed;
26
+ /*function addDoubleSlashToSeed(seed: string): string {
27
+ return seed.startsWith('//') ? seed : '//' + seed;
28
28
  }*/
29
29
 
30
- /*
31
- createManifest: This function batch uploads manifests
30
+ /*
31
+ createManifest: This function batch uploads manifests
32
32
  */
33
33
  function serialize(obj) {
34
34
  return JSON.stringify(obj);
@@ -124,8 +124,8 @@ export const batchUploadManifest = async function (api, seed, cids_i, poolId_i)
124
124
  }
125
125
  };
126
126
 
127
- /*
128
- listPools: This function takes start index and length and returns a promise of an object that contains a list of pools. Each pool in the list contains the poolID, owner, poolName, parent, and participants of the pool
127
+ /*
128
+ listPools: This function takes start index and length and returns a promise of an object that contains a list of pools. Each pool in the list contains the poolID, owner, poolName, parent, and participants of the pool
129
129
  */
130
130
  export const listPools = async function (api) {
131
131
  let start = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
@@ -164,8 +164,8 @@ export const listPools = async function (api) {
164
164
  }
165
165
  };
166
166
 
167
- /*
168
- checkJoinRequest: This function takes poolId and AccontId and returns a promise of an object that contains request to the pools.
167
+ /*
168
+ checkJoinRequest: This function takes poolId and AccontId and returns a promise of an object that contains request to the pools.
169
169
  */
170
170
  export const checkJoinRequest = async (api, poolId, accountId) => {
171
171
  console.log('checkJoinRequest in react-native started');
@@ -191,8 +191,8 @@ export const checkJoinRequest = async (api, poolId, accountId) => {
191
191
  function isAccountInfo(obj) {
192
192
  return 'data' in obj && 'free' in obj.data;
193
193
  }
194
- /*
195
- checkAccountExsists: This function takes accountId and checks if the account exists
194
+ /*
195
+ checkAccountExsists: This function takes accountId and checks if the account exists
196
196
  */
197
197
  export const checkAccountBalance = async (api, accountId) => {
198
198
  console.log('checkAcocuntExsists in react-native started');
package/package.json CHANGED
@@ -1,178 +1,178 @@
1
- {
2
- "name": "@functionland/react-native-fula",
3
- "version": "1.19.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
- "*.podspec",
17
- "!lib/typescript/example",
18
- "!ios/build",
19
- "!android/build",
20
- "!android/gradle",
21
- "!android/gradlew",
22
- "!android/gradlew.bat",
23
- "!android/local.properties",
24
- "!**/__tests__",
25
- "!**/__fixtures__",
26
- "!**/__mocks__",
27
- "!**/.*"
28
- ],
29
- "scripts": {
30
- "test": "jest",
31
- "typecheck": "tsc --noEmit",
32
- "lint": "eslint \"**/*.{js,ts,tsx}\"",
33
- "prepack": "bob build",
34
- "release": "release-it",
35
- "example": "yarn --cwd example",
36
- "build:android": "cd example/android && ./gradlew assembleDebug --no-daemon --console=plain -PreactNativeArchitectures=arm64-v8a",
37
- "build:ios": "cd example/ios && xcodebuild -workspace FulaExample.xcworkspace -scheme FulaExample -configuration Debug -sdk iphonesimulator CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ GCC_OPTIMIZATION_LEVEL=0 GCC_PRECOMPILE_PREFIX_HEADER=YES ASSETCATALOG_COMPILER_OPTIMIZATION=time DEBUG_INFORMATION_FORMAT=dwarf COMPILER_INDEX_STORE_ENABLE=NO",
38
- "bootstrap": "yarn example && yarn install && yarn example pods",
39
- "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build",
40
- "build:polkadot": "yarn generate:defs && yarn generate:meta",
41
- "generate:defs": "ts-node --skip-project node_modules/.bin/polkadot-types-from-defs --input ./src/interfaces --endpoint ./edgeware.json",
42
- "generate:meta": "ts-node --skip-project node_modules/.bin/polkadot-types-from-chain --endpoint ./edgeware.json --output ./src/interfaces"
43
- },
44
- "keywords": [
45
- "react-native",
46
- "ios",
47
- "android"
48
- ],
49
- "repository": "https://github.com/functionland/react-native-fula",
50
- "author": "Ehsan Shariati <ehsan6sha@gmail.com> (https://github.com/ehsan6sha)",
51
- "license": "MIT",
52
- "bugs": {
53
- "url": "https://github.com/functionland/react-native-fula/issues"
54
- },
55
- "homepage": "https://github.com/functionland/react-native-fula#readme",
56
- "publishConfig": {
57
- "registry": "https://registry.npmjs.org/"
58
- },
59
- "devDependencies": {
60
- "@babel/plugin-proposal-export-namespace-from": "^7.16.7",
61
- "@commitlint/config-conventional": "^17.0.2",
62
- "@evilmartians/lefthook": "^1.2.2",
63
- "@react-native-community/eslint-config": "^3.0.2",
64
- "@release-it/conventional-changelog": "^5.0.0",
65
- "@types/jest": "^28.1.2",
66
- "@types/react": "~17.0.21",
67
- "@types/react-native": "0.70.0",
68
- "commitlint": "^17.0.2",
69
- "del-cli": "^5.0.0",
70
- "eslint": "^8.4.1",
71
- "eslint-config-prettier": "^8.5.0",
72
- "eslint-plugin-prettier": "^4.0.0",
73
- "jest": "^28.1.1",
74
- "pod-install": "^0.1.0",
75
- "prettier": "^2.0.5",
76
- "react": "18.2.0",
77
- "react-native": "0.72.3",
78
- "react-native-builder-bob": "^0.20.0",
79
- "release-it": "^15.0.0",
80
- "ts-node": "^10.9.1",
81
- "turbo": "^1.10.7",
82
- "typescript": "^5.0.2"
83
- },
84
- "resolutions": {
85
- "@types/react": "17.0.21"
86
- },
87
- "peerDependencies": {
88
- "@babel/core": "^7.0.0-0",
89
- "@babel/preset-env": "^7.1.6",
90
- "react": "*",
91
- "react-native": "*"
92
- },
93
- "engines": {
94
- "node": ">= 16.0.0"
95
- },
96
- "packageManager": "^yarn@1.22.15",
97
- "jest": {
98
- "preset": "react-native",
99
- "modulePathIgnorePatterns": [
100
- "<rootDir>/example/node_modules",
101
- "<rootDir>/lib/"
102
- ]
103
- },
104
- "commitlint": {
105
- "extends": [
106
- "@commitlint/config-conventional"
107
- ]
108
- },
109
- "release-it": {
110
- "git": {
111
- "commitMessage": "chore: release ${version}",
112
- "tagName": "v${version}"
113
- },
114
- "npm": {
115
- "publish": true
116
- },
117
- "github": {
118
- "release": true
119
- },
120
- "plugins": {
121
- "@release-it/conventional-changelog": {
122
- "preset": "angular"
123
- }
124
- }
125
- },
126
- "eslintConfig": {
127
- "root": true,
128
- "extends": [
129
- "@react-native-community",
130
- "prettier"
131
- ],
132
- "rules": {
133
- "prettier/prettier": [
134
- "error",
135
- {
136
- "quoteProps": "consistent",
137
- "singleQuote": true,
138
- "tabWidth": 2,
139
- "trailingComma": "es5",
140
- "useTabs": false
141
- }
142
- ]
143
- }
144
- },
145
- "eslintIgnore": [
146
- "node_modules/",
147
- "lib/"
148
- ],
149
- "prettier": {
150
- "quoteProps": "consistent",
151
- "singleQuote": true,
152
- "tabWidth": 2,
153
- "trailingComma": "es5",
154
- "useTabs": false
155
- },
156
- "react-native-builder-bob": {
157
- "source": "src",
158
- "output": "lib",
159
- "targets": [
160
- "commonjs",
161
- "module",
162
- [
163
- "typescript",
164
- {
165
- "project": "tsconfig.build.json"
166
- }
167
- ]
168
- ]
169
- },
170
- "dependencies": {
171
- "@polkadot/api": "^9.11.3",
172
- "@polkadot/keyring": "^10.2.6",
173
- "@polkadot/typegen": "^10.10.1",
174
- "@polkadot/util": "^10.2.6",
175
- "@polkadot/util-crypto": "^10.2.6",
176
- "text-encoding": "^0.7.0"
177
- }
178
- }
1
+ {
2
+ "name": "@functionland/react-native-fula",
3
+ "version": "1.20.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
+ "*.podspec",
17
+ "!lib/typescript/example",
18
+ "!ios/build",
19
+ "!android/build",
20
+ "!android/gradle",
21
+ "!android/gradlew",
22
+ "!android/gradlew.bat",
23
+ "!android/local.properties",
24
+ "!**/__tests__",
25
+ "!**/__fixtures__",
26
+ "!**/__mocks__",
27
+ "!**/.*"
28
+ ],
29
+ "scripts": {
30
+ "test": "jest",
31
+ "typecheck": "tsc --noEmit",
32
+ "lint": "eslint \"**/*.{js,ts,tsx}\"",
33
+ "prepack": "bob build",
34
+ "release": "release-it",
35
+ "example": "yarn --cwd example",
36
+ "build:android": "cd example/android && ./gradlew assembleDebug --no-daemon --console=plain -PreactNativeArchitectures=arm64-v8a",
37
+ "build:ios": "cd example/ios && xcodebuild -workspace FulaExample.xcworkspace -scheme FulaExample -configuration Debug -sdk iphonesimulator CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ GCC_OPTIMIZATION_LEVEL=0 GCC_PRECOMPILE_PREFIX_HEADER=YES ASSETCATALOG_COMPILER_OPTIMIZATION=time DEBUG_INFORMATION_FORMAT=dwarf COMPILER_INDEX_STORE_ENABLE=NO",
38
+ "bootstrap": "yarn example && yarn install && yarn example pods",
39
+ "clean": "del-cli android/build example/android/build example/android/app/build example/ios/build",
40
+ "build:polkadot": "yarn generate:defs && yarn generate:meta",
41
+ "generate:defs": "ts-node --skip-project node_modules/.bin/polkadot-types-from-defs --input ./src/interfaces --endpoint ./edgeware.json",
42
+ "generate:meta": "ts-node --skip-project node_modules/.bin/polkadot-types-from-chain --endpoint ./edgeware.json --output ./src/interfaces"
43
+ },
44
+ "keywords": [
45
+ "react-native",
46
+ "ios",
47
+ "android"
48
+ ],
49
+ "repository": "https://github.com/functionland/react-native-fula",
50
+ "author": "Ehsan Shariati <ehsan6sha@gmail.com> (https://github.com/ehsan6sha)",
51
+ "license": "MIT",
52
+ "bugs": {
53
+ "url": "https://github.com/functionland/react-native-fula/issues"
54
+ },
55
+ "homepage": "https://github.com/functionland/react-native-fula#readme",
56
+ "publishConfig": {
57
+ "registry": "https://registry.npmjs.org/"
58
+ },
59
+ "devDependencies": {
60
+ "@babel/plugin-proposal-export-namespace-from": "^7.16.7",
61
+ "@commitlint/config-conventional": "^17.0.2",
62
+ "@evilmartians/lefthook": "^1.2.2",
63
+ "@react-native-community/eslint-config": "^3.0.2",
64
+ "@release-it/conventional-changelog": "^5.0.0",
65
+ "@types/jest": "^28.1.2",
66
+ "@types/react": "~17.0.21",
67
+ "@types/react-native": "0.70.0",
68
+ "commitlint": "^17.0.2",
69
+ "del-cli": "^5.0.0",
70
+ "eslint": "^8.4.1",
71
+ "eslint-config-prettier": "^8.5.0",
72
+ "eslint-plugin-prettier": "^4.0.0",
73
+ "jest": "^28.1.1",
74
+ "pod-install": "^0.1.0",
75
+ "prettier": "^2.0.5",
76
+ "react": "18.2.0",
77
+ "react-native": "0.72.3",
78
+ "react-native-builder-bob": "^0.20.0",
79
+ "release-it": "^15.0.0",
80
+ "ts-node": "^10.9.1",
81
+ "turbo": "^1.10.7",
82
+ "typescript": "^5.0.2"
83
+ },
84
+ "resolutions": {
85
+ "@types/react": "17.0.21"
86
+ },
87
+ "peerDependencies": {
88
+ "@babel/core": "^7.0.0-0",
89
+ "@babel/preset-env": "^7.1.6",
90
+ "react": "*",
91
+ "react-native": "*"
92
+ },
93
+ "engines": {
94
+ "node": ">= 16.0.0"
95
+ },
96
+ "packageManager": "^yarn@1.22.15",
97
+ "jest": {
98
+ "preset": "react-native",
99
+ "modulePathIgnorePatterns": [
100
+ "<rootDir>/example/node_modules",
101
+ "<rootDir>/lib/"
102
+ ]
103
+ },
104
+ "commitlint": {
105
+ "extends": [
106
+ "@commitlint/config-conventional"
107
+ ]
108
+ },
109
+ "release-it": {
110
+ "git": {
111
+ "commitMessage": "chore: release ${version}",
112
+ "tagName": "v${version}"
113
+ },
114
+ "npm": {
115
+ "publish": true
116
+ },
117
+ "github": {
118
+ "release": true
119
+ },
120
+ "plugins": {
121
+ "@release-it/conventional-changelog": {
122
+ "preset": "angular"
123
+ }
124
+ }
125
+ },
126
+ "eslintConfig": {
127
+ "root": true,
128
+ "extends": [
129
+ "@react-native-community",
130
+ "prettier"
131
+ ],
132
+ "rules": {
133
+ "prettier/prettier": [
134
+ "error",
135
+ {
136
+ "quoteProps": "consistent",
137
+ "singleQuote": true,
138
+ "tabWidth": 2,
139
+ "trailingComma": "es5",
140
+ "useTabs": false
141
+ }
142
+ ]
143
+ }
144
+ },
145
+ "eslintIgnore": [
146
+ "node_modules/",
147
+ "lib/"
148
+ ],
149
+ "prettier": {
150
+ "quoteProps": "consistent",
151
+ "singleQuote": true,
152
+ "tabWidth": 2,
153
+ "trailingComma": "es5",
154
+ "useTabs": false
155
+ },
156
+ "react-native-builder-bob": {
157
+ "source": "src",
158
+ "output": "lib",
159
+ "targets": [
160
+ "commonjs",
161
+ "module",
162
+ [
163
+ "typescript",
164
+ {
165
+ "project": "tsconfig.build.json"
166
+ }
167
+ ]
168
+ ]
169
+ },
170
+ "dependencies": {
171
+ "@polkadot/api": "^9.11.3",
172
+ "@polkadot/keyring": "^10.2.6",
173
+ "@polkadot/typegen": "^10.10.1",
174
+ "@polkadot/util": "^10.2.6",
175
+ "@polkadot/util-crypto": "^10.2.6",
176
+ "text-encoding": "^0.7.0"
177
+ }
178
+ }