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
Merge requests
!29
New 'id' command for id and pubkey correspondence
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
New 'id' command for id and pubkey correspondence
id_pubkey_correspondence
into
master
Overview
13
Commits
5
Pipelines
0
Changes
4
Merged
Moul
requested to merge
id_pubkey_correspondence
into
master
8 years ago
Overview
13
Commits
5
Pipelines
0
Changes
4
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
c02ed5bc
5 commits,
7 years ago
4 files
+
40
−
5
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
4
Search (e.g. *.vue) (Ctrl+P)
src/commands.py
+
15
−
0
Options
@@ -8,6 +8,7 @@ from network_tools import *
from
tx
import
*
from
auth
import
*
from
tools
import
*
from
constants
import
*
def
currency_info
(
ep
):
info_type
=
[
"
newcomers
"
,
"
certs
"
,
"
actives
"
,
"
leavers
"
,
"
excluded
"
,
"
ud
"
,
"
tx
"
]
@@ -172,6 +173,7 @@ def cmd_amount(ep, c):
if
c
.
contains_definitions
(
'
pubkey
'
):
pubkey
=
c
.
get_definition
(
'
pubkey
'
)
pubkey
=
check_public_key
(
pubkey
)
if
not
pubkey
:
return
else
:
seed
=
auth_method
(
c
)
pubkey
=
get_publickey_from_seed
(
seed
)
@@ -273,3 +275,16 @@ def argos_info(ep):
"
\n
-- Excluded:
"
,
len
(
info_data
[
"
excluded
"
]),
"
\n
-- UD created:
"
,
len
(
info_data
[
"
ud
"
]),
"
\n
-- transactions:
"
,
len
(
info_data
[
"
tx
"
]))
def
id_pubkey_correspondence
(
ep
,
id_pubkey
):
if
check_public_key
(
id_pubkey
):
print
(
"
{} public key corresponds to identity: {}
"
.
format
(
id_pubkey
,
get_uid_from_pubkey
(
ep
,
id_pubkey
)))
else
:
pubkeys
=
get_pubkeys_from_id
(
ep
,
id_pubkey
)
if
pubkeys
==
NO_MATCHING_ID
:
print
(
NO_MATCHING_ID
)
else
:
print
(
"
Public keys found matching
'
{}
'
:
\n
"
.
format
(
id_pubkey
))
for
pubkey
in
pubkeys
:
print
(
"
-
"
,
pubkey
[
"
pubkey
"
])
Loading