Compare commits
7 Commits
sohail/doc
...
v0.0.9
| Author | SHA1 | Date | |
|---|---|---|---|
| 618aa7716e | |||
| 17ae29887f | |||
| fbb5168b40 | |||
| c269318528 | |||
| c3e8883f15 | |||
|
5f62287913
|
|||
| 28d7699a4a |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -3,4 +3,5 @@ __pycache__
|
||||
build/
|
||||
*.pyc
|
||||
.venv
|
||||
.clicada
|
||||
.clicada
|
||||
dist/
|
||||
@@ -1,3 +1,5 @@
|
||||
- 0.0.7
|
||||
* fix: make store_path relative to the users home
|
||||
- 0.0.6
|
||||
* Add cache encryption, with AES-CTR-128
|
||||
- 0.0.5
|
||||
|
||||
18
README.md
18
README.md
@@ -28,6 +28,18 @@ pip install -r requirements.txt --extra-index-url=https://pip.grassrootseconomic
|
||||
pip3 install -UI --extra-index-url=https://pip.grassrootseconomics.net clicada
|
||||
```
|
||||
|
||||
### GPG Keyring setup
|
||||
|
||||
PGP uses the default keyring, you can however pass in a custom keyring path.
|
||||
|
||||
To create a keyring from a specific key and get its path for `AUTH_KEYRING_PATH`:
|
||||
|
||||
```bash
|
||||
# In some dir
|
||||
gpg --homedir .gnupg --import private.pgp
|
||||
pwd
|
||||
```
|
||||
|
||||
### Usage
|
||||
|
||||
```bash
|
||||
@@ -67,3 +79,9 @@ optional arguments:
|
||||
override fee limit
|
||||
|
||||
```
|
||||
|
||||
### Example
|
||||
|
||||
```bash
|
||||
AUTH_PASSPHRASE=queenmarlena AUTH_KEYRING_PATH=/home/kamikaze/grassroots/usumbufu/tests/testdata/pgp/.gnupg/ AUTH_KEY=CCE2E1D2D0E36ADE0405E2D0995BB21816313BD5 CHAIN_SPEC=evm:byzantium:8996:bloxberg CIC_REGISTRY_ADDRESS=0xcf60ebc445b636a5ab787f9e8bc465a2a3ef8299 RPC_PROVIDER=https://rpc.grassecon.net TX_CACHE_URL=https://cache.grassecon.net HTTP_CORS_ORIGIN=https://auth.grassecon.net META_HTTP_ORIGIN=https://auth.grassecon.net:443 PYTHONPATH=. python clicada/runnable/view.py u --meta-url https://auth.grassecon.net +254711000000
|
||||
```
|
||||
|
||||
@@ -3,7 +3,8 @@ import json
|
||||
|
||||
# external imports
|
||||
from clicada.user import FileUserStore
|
||||
|
||||
from pathlib import Path
|
||||
import os
|
||||
|
||||
categories = [
|
||||
'phone',
|
||||
@@ -35,7 +36,7 @@ def validate(config, args):
|
||||
|
||||
|
||||
def execute(ctrl):
|
||||
store_path = '.clicada'
|
||||
store_path = os.path.join(str(Path.home()), '.clicada')
|
||||
user_store = FileUserStore(None, ctrl.chain(), ctrl.get('_CATEGORY'), store_path, int(ctrl.get('FILESTORE_TTL')))
|
||||
user_store.put(ctrl.get('_IDENTIFIER'), json.dumps(ctrl.get('_TAG')), force=True)
|
||||
user_store.stick(ctrl.get('_IDENTIFIER'))
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
import sys
|
||||
import logging
|
||||
import datetime
|
||||
from pathlib import Path
|
||||
import os
|
||||
|
||||
# external imports
|
||||
from cic_eth_registry import CICRegistry
|
||||
@@ -54,7 +56,7 @@ def validate(config, args):
|
||||
def execute(ctrl):
|
||||
tx_getter = TxGetter(ctrl.get('TX_CACHE_URL'), 10)
|
||||
|
||||
store_path = '.clicada'
|
||||
store_path = os.path.join(str(Path.home()), '.clicada')
|
||||
user_phone_file_label = 'phone'
|
||||
user_phone_store = FileUserStore(ctrl.opener('meta'), ctrl.chain(), user_phone_file_label, store_path, int(ctrl.get('FILESTORE_TTL')), encrypter=ctrl.encrypter)
|
||||
|
||||
|
||||
@@ -269,7 +269,7 @@ class FileUserStore:
|
||||
except Exception as e:
|
||||
logg.debug('no metadata found for {}: {}'.format(address, e))
|
||||
|
||||
if r == None:
|
||||
if not r:
|
||||
self.failed_entities[address] = True
|
||||
raise MetadataNotFoundError()
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
usumbufu~=0.3.5
|
||||
confini~=0.5.3
|
||||
cic-eth-registry~=0.6.1
|
||||
cic-types~=0.2.1a8
|
||||
usumbufu~=0.3.8
|
||||
confini~=0.6.0
|
||||
cic-eth-registry~=0.6.9
|
||||
cic-types~=0.2.2
|
||||
phonenumbers==8.12.12
|
||||
eth-erc20~=0.1.2
|
||||
eth-erc20~=0.3.0
|
||||
hexathon~=0.1.0
|
||||
pycryptodome~=3.10.1
|
||||
chainlib-eth~=0.0.21
|
||||
chainlib~=0.0.17
|
||||
chainlib-eth~=0.1.0
|
||||
chainlib~=0.1.0
|
||||
|
||||
Reference in New Issue
Block a user