-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of github.com:Remmeauth/remme-core-cli into ge…
…t-swap-public-key
- Loading branch information
Showing
44 changed files
with
1,632 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
exclude: | ||
- develop | ||
- master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
""" | ||
Provide forms for command line interface's account commands. | ||
""" | ||
from marshmallow import ( | ||
Schema, | ||
fields, | ||
validate, | ||
) | ||
|
||
from cli.generic.forms.fields import ( | ||
AccountAddressField, | ||
NodeURLField, | ||
PrivateKeyField, | ||
) | ||
|
||
|
||
class GetAccountBalanceForm(Schema): | ||
""" | ||
Get balance of the account form. | ||
""" | ||
|
||
address = AccountAddressField(required=True) | ||
node_url = NodeURLField(allow_none=True, required=False) | ||
|
||
|
||
class TransferTokensForm(Schema): | ||
""" | ||
Transfer tokens to address form. | ||
""" | ||
|
||
private_key = PrivateKeyField(required=True) | ||
address_to = AccountAddressField(required=True) | ||
amount = fields.Integer( | ||
strict=True, | ||
required=True, | ||
validate=[ | ||
validate.Range(min=1, error='Amount must be greater than 0.'), | ||
], | ||
) | ||
node_url = NodeURLField(allow_none=True, required=False) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
""" | ||
Provide help messages for command line interface's account commands. | ||
""" | ||
GET_ACCOUNT_BALANCE_ADDRESS_ARGUMENT_HELP_MESSAGE = 'Get balance of the account by its address.' | ||
ADDRESS_ARGUMENT_HELP_MESSAGE = 'Account address to get a balance by.' | ||
ADDRESS_TO_ARGUMENT_HELP_MESSAGE = 'Account address to transfer tokens to.' | ||
AMOUNT_ARGUMENT_HELP_MESSAGE = 'Amount to transfer.' | ||
GET_ACCOUNT_BALANCE_ADDRESS_ARGUMENT_HELP_MESSAGE = 'Account address to get a balance by.' | ||
PRIVATE_KEY_ARGUMENT_HELP_MESSAGE = 'Account\'s private key to transfer tokens from.' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.