Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
silkaj
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
clients
python
silkaj
Commits
40a2f13b
Commit
40a2f13b
authored
7 years ago
by
Moul
Browse files
Options
Downloads
Patches
Plain Diff
[enh]
#78
: use Scrypt as default authentication method:
- update help: Authentication section at the end.
parent
eb651903
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/auth.py
+2
-3
2 additions, 3 deletions
src/auth.py
src/silkaj.py
+13
-11
13 additions, 11 deletions
src/silkaj.py
with
15 additions
and
14 deletions
src/auth.py
+
2
−
3
View file @
40a2f13b
...
@@ -9,15 +9,14 @@ from re import compile, search
...
@@ -9,15 +9,14 @@ from re import compile, search
def
auth_method
(
cli_args
):
def
auth_method
(
cli_args
):
if
cli_args
.
contains_switches
(
'
auth-scrypt
'
):
return
auth_by_scrypt
(
cli_args
)
if
cli_args
.
contains_switches
(
'
auth-seed
'
):
if
cli_args
.
contains_switches
(
'
auth-seed
'
):
return
auth_by_seed
()
return
auth_by_seed
()
if
cli_args
.
contains_switches
(
'
auth-file
'
):
if
cli_args
.
contains_switches
(
'
auth-file
'
):
return
auth_by_auth_file
(
cli_args
)
return
auth_by_auth_file
(
cli_args
)
if
cli_args
.
contains_switches
(
'
auth-wif
'
):
if
cli_args
.
contains_switches
(
'
auth-wif
'
):
return
auth_by_wif
()
return
auth_by_wif
()
message_exit
(
"
Error: no authentication method
"
)
else
:
return
auth_by_scrypt
(
cli_args
)
def
generate_auth_file
(
cli_args
):
def
generate_auth_file
(
cli_args
):
...
...
This diff is collapsed.
Click to expand it.
src/silkaj.py
+
13
−
11
View file @
40a2f13b
...
@@ -27,13 +27,10 @@ def usage():
...
@@ -27,13 +27,10 @@ def usage():
\n
\
\n
\
\n
- amount: Get amount of accounts
\
\n
- amount: Get amount of accounts
\
\n
pubkeys and/or ids separated with colon: <pubkey:id:pubkey>
\
\n
pubkeys and/or ids separated with colon: <pubkey:id:pubkey>
\
\n
--auth-scrypt [script parameters -n <N> -r <r> -p <p>] (default: 4096,16,1)
\
\n
- authentication: see below section
\
\n
--auth-seed | --auth-file [--file=<path file>] | --auth-wif
\
\n
\
\n
\
\n
- tx/transaction: Send transaction
\
\n
- tx/transaction: Send transaction
\
\n
- authentication:
\
\n
- authentication: see below section
\
\n
--auth-scrypt [script parameters -n <N> -r <r> -p <p>] (default: 4096,16,1)
\
\n
--auth-seed | --auth-file [--file=<path file>] | --auth-wif
\
\n
- amount:
\
\n
- amount:
\
\n
--amountUD=<relative value> | --amount=<quantitative value>
\
\n
--amountUD=<relative value> | --amount=<quantitative value>
\
\n
[--allSources]
\
\n
[--allSources]
\
...
@@ -44,9 +41,7 @@ def usage():
...
@@ -44,9 +41,7 @@ def usage():
\n
\
\n
\
\n
- cert: Send certification
\
\n
- cert: Send certification
\
\n
- e.g.: silkaj cert <id> <auth>
\
\n
- e.g.: silkaj cert <id> <auth>
\
\n
- authentication:
\
\n
- authentication: see below section
\
\n
--auth-scrypt [script parameters -n <N> -r <r> -p <p>] (default: 4096,16,1)
\
\n
--auth-seed | --auth-file [--file=<path file>] | --auth-wif
\
\n
\
\n
\
\n
- net/network: Display current network with many information
\
\n
- net/network: Display current network with many information
\
\n
[--discover] Discover all network (could take a while), optional
\
\n
[--discover] Discover all network (could take a while), optional
\
...
@@ -62,13 +57,20 @@ def usage():
...
@@ -62,13 +57,20 @@ def usage():
\n
- argos: display currency information formated for Argos or BitBar
\
\n
- argos: display currency information formated for Argos or BitBar
\
\n
\
\n
\
\n
- generate_auth_file: Generate file to store the seed of the account
\
\n
- generate_auth_file: Generate file to store the seed of the account
\
\n
--auth-scrypt [script parameters -n <N> -r <r> -p <p>] (default: 4096,16,1)
\
\n
- authentication: see below section
\
\n
--auth-seed | --auth-file [--file=<path file>] | --auth-wif
\
\n
\
\n
\
\n
- id/identities <pubkey> or <identity>: get corresponding identity or pubkey from pubkey or identity.
\
\n
- id/identities <pubkey> or <identity>: get corresponding identity or pubkey from pubkey or identity.
\
\n
it could autocomplete the pubkey corresponding to an identity with three or four following characters.
\
\n
it could autocomplete the pubkey corresponding to an identity with three or four following characters.
\
\n
\
\n
\
\n
- wot <pubkey> or <identity>: display received and sent certifications for an account.
"
)
\n
- wot <pubkey> or <identity>: display received and sent certifications for an account.
\
\n\
\n
Authentication:
\
\n
for amount, transaction, certification, and generate_auth_file commands
\
\n
- Scrypt is the default authentication method with 4096,16,1 as default values
\
\n
you can specify others values specifying following parameters: -n <N> -r <r> -p <p>
\
\n
- Seed: --auth-seed
\
\n
- File: --auth-file [--file=<path file>]
\
\n
- WIF: --auth-wif
"
)
def
cli
():
def
cli
():
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment