Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
beem
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hive
beem
Commits
0cd7a860
Commit
0cd7a860
authored
6 years ago
by
crokkon
Browse files
Options
Downloads
Patches
Plain Diff
steem/wallet.py: documentation updates
parent
da9d8b5f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
beem/wallet.py
+18
-1
18 additions, 1 deletion
beem/wallet.py
with
18 additions
and
1 deletion
beem/wallet.py
+
18
−
1
View file @
0cd7a860
...
@@ -393,6 +393,8 @@ class Wallet(object):
...
@@ -393,6 +393,8 @@ class Wallet(object):
def
removeTokenFromPublicName
(
self
,
name
):
def
removeTokenFromPublicName
(
self
,
name
):
"""
Remove a token from the wallet database
"""
Remove a token from the wallet database
:param str name: token to be removed
"""
"""
if
self
.
tokenStorage
:
if
self
.
tokenStorage
:
# Test if wallet exists
# Test if wallet exists
...
@@ -401,7 +403,10 @@ class Wallet(object):
...
@@ -401,7 +403,10 @@ class Wallet(object):
self
.
tokenStorage
.
delete
(
name
)
self
.
tokenStorage
.
delete
(
name
)
def
addPrivateKey
(
self
,
wif
):
def
addPrivateKey
(
self
,
wif
):
"""
Add a private key to the wallet database
"""
"""
Add a private key to the wallet database
:param str wif: Private key
"""
pub
=
self
.
_get_pub_from_wif
(
wif
)
pub
=
self
.
_get_pub_from_wif
(
wif
)
if
isinstance
(
wif
,
PrivateKey
):
if
isinstance
(
wif
,
PrivateKey
):
wif
=
str
(
wif
)
wif
=
str
(
wif
)
...
@@ -436,6 +441,8 @@ class Wallet(object):
...
@@ -436,6 +441,8 @@ class Wallet(object):
def
removePrivateKeyFromPublicKey
(
self
,
pub
):
def
removePrivateKeyFromPublicKey
(
self
,
pub
):
"""
Remove a key from the wallet database
"""
Remove a key from the wallet database
:param str pub: Public key
"""
"""
if
self
.
keyStorage
:
if
self
.
keyStorage
:
# Test if wallet exists
# Test if wallet exists
...
@@ -445,6 +452,8 @@ class Wallet(object):
...
@@ -445,6 +452,8 @@ class Wallet(object):
def
removeAccount
(
self
,
account
):
def
removeAccount
(
self
,
account
):
"""
Remove all keys associated with a given account
"""
Remove all keys associated with a given account
:param str account: name of account to be removed
"""
"""
accounts
=
self
.
getAccounts
()
accounts
=
self
.
getAccounts
()
for
a
in
accounts
:
for
a
in
accounts
:
...
@@ -453,6 +462,10 @@ class Wallet(object):
...
@@ -453,6 +462,10 @@ class Wallet(object):
def
getKeyForAccount
(
self
,
name
,
key_type
):
def
getKeyForAccount
(
self
,
name
,
key_type
):
"""
Obtain `key_type` Private Key for an account from the wallet database
"""
Obtain `key_type` Private Key for an account from the wallet database
:param str name: Account name
:param str key_type: key type, has to be one of
"
owner
"
,
"
active
"
,
"
posting
"
or
"
memo
"
"""
"""
if
key_type
not
in
[
"
owner
"
,
"
active
"
,
"
posting
"
,
"
memo
"
]:
if
key_type
not
in
[
"
owner
"
,
"
active
"
,
"
posting
"
,
"
memo
"
]:
raise
AssertionError
(
"
Wrong key type
"
)
raise
AssertionError
(
"
Wrong key type
"
)
...
@@ -487,6 +500,10 @@ class Wallet(object):
...
@@ -487,6 +500,10 @@ class Wallet(object):
def
getKeysForAccount
(
self
,
name
,
key_type
):
def
getKeysForAccount
(
self
,
name
,
key_type
):
"""
Obtain a List of `key_type` Private Keys for an account from the wallet database
"""
Obtain a List of `key_type` Private Keys for an account from the wallet database
:param str name: Account name
:param str key_type: key type, has to be one of
"
owner
"
,
"
active
"
,
"
posting
"
or
"
memo
"
"""
"""
if
key_type
not
in
[
"
owner
"
,
"
active
"
,
"
posting
"
,
"
memo
"
]:
if
key_type
not
in
[
"
owner
"
,
"
active
"
,
"
posting
"
,
"
memo
"
]:
raise
AssertionError
(
"
Wrong key type
"
)
raise
AssertionError
(
"
Wrong key type
"
)
...
...
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