This repository has been archived by the owner on May 28, 2019. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vendor: trezor-common version bump & pb sync
- Loading branch information
Showing
29 changed files
with
508 additions
and
53 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,15 @@ | ||
# Automatically generated by pb2py | ||
# fmt: off | ||
import protobuf as p | ||
|
||
|
||
class TronAccountUpdateContract(p.MessageType): | ||
FIELDS = { | ||
1: ('account_name', p.UnicodeType, 0), | ||
} | ||
|
||
def __init__( | ||
self, | ||
account_name: str = None, | ||
) -> None: | ||
self.account_name = account_name |
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,16 @@ | ||
# Automatically generated by pb2py | ||
# fmt: off | ||
import protobuf as p | ||
|
||
|
||
class TronAddress(p.MessageType): | ||
MESSAGE_WIRE_TYPE = 251 | ||
FIELDS = { | ||
1: ('address', p.UnicodeType, 0), | ||
} | ||
|
||
def __init__( | ||
self, | ||
address: str = None, | ||
) -> None: | ||
self.address = address |
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,50 @@ | ||
# Automatically generated by pb2py | ||
# fmt: off | ||
import protobuf as p | ||
|
||
from .TronFrozenSupply import TronFrozenSupply | ||
|
||
if __debug__: | ||
try: | ||
from typing import List | ||
except ImportError: | ||
List = None # type: ignore | ||
|
||
|
||
class TronAssetIssueContract(p.MessageType): | ||
FIELDS = { | ||
2: ('name', p.UnicodeType, 0), | ||
3: ('abbr', p.UnicodeType, 0), | ||
4: ('total_supply', p.UVarintType, 0), | ||
5: ('frozen_supply', TronFrozenSupply, p.FLAG_REPEATED), | ||
6: ('trx_num', p.UVarintType, 0), | ||
7: ('num', p.UVarintType, 0), | ||
8: ('start_time', p.UVarintType, 0), | ||
9: ('end_time', p.UVarintType, 0), | ||
10: ('description', p.UnicodeType, 0), | ||
11: ('url', p.UnicodeType, 0), | ||
} | ||
|
||
def __init__( | ||
self, | ||
name: str = None, | ||
abbr: str = None, | ||
total_supply: int = None, | ||
frozen_supply: List[TronFrozenSupply] = None, | ||
trx_num: int = None, | ||
num: int = None, | ||
start_time: int = None, | ||
end_time: int = None, | ||
description: str = None, | ||
url: str = None, | ||
) -> None: | ||
self.name = name | ||
self.abbr = abbr | ||
self.total_supply = total_supply | ||
self.frozen_supply = frozen_supply if frozen_supply is not None else [] | ||
self.trx_num = trx_num | ||
self.num = num | ||
self.start_time = start_time | ||
self.end_time = end_time | ||
self.description = description | ||
self.url = url |
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,77 @@ | ||
# Automatically generated by pb2py | ||
# fmt: off | ||
import protobuf as p | ||
|
||
from .TronAccountUpdateContract import TronAccountUpdateContract | ||
from .TronAssetIssueContract import TronAssetIssueContract | ||
from .TronFreezeBalanceContract import TronFreezeBalanceContract | ||
from .TronParticipateAssetIssueContract import TronParticipateAssetIssueContract | ||
from .TronProposalApproveContract import TronProposalApproveContract | ||
from .TronProposalCreateContract import TronProposalCreateContract | ||
from .TronProposalDeleteContract import TronProposalDeleteContract | ||
from .TronTransferAssetContract import TronTransferAssetContract | ||
from .TronTransferContract import TronTransferContract | ||
from .TronUnfreezeAssetContract import TronUnfreezeAssetContract | ||
from .TronUnfreezeBalanceContract import TronUnfreezeBalanceContract | ||
from .TronUpdateAssetContract import TronUpdateAssetContract | ||
from .TronVoteWitnessContract import TronVoteWitnessContract | ||
from .TronWithdrawBalanceContract import TronWithdrawBalanceContract | ||
from .TronWitnessCreateContract import TronWitnessCreateContract | ||
from .TronWitnessUpdateContract import TronWitnessUpdateContract | ||
|
||
|
||
class TronContract(p.MessageType): | ||
FIELDS = { | ||
1: ('transfer_contract', TronTransferContract, 0), | ||
2: ('transfer_asset_contract', TronTransferAssetContract, 0), | ||
4: ('vote_witness_contract', TronVoteWitnessContract, 0), | ||
5: ('witness_create_contract', TronWitnessCreateContract, 0), | ||
6: ('asset_issue_contract', TronAssetIssueContract, 0), | ||
8: ('witness_update_contract', TronWitnessUpdateContract, 0), | ||
9: ('participate_asset_issue_contract', TronParticipateAssetIssueContract, 0), | ||
10: ('account_update_contract', TronAccountUpdateContract, 0), | ||
11: ('freeze_balance_contract', TronFreezeBalanceContract, 0), | ||
12: ('unfreeze_balance_contract', TronUnfreezeBalanceContract, 0), | ||
13: ('withdraw_balance_contract', TronWithdrawBalanceContract, 0), | ||
14: ('unfreeze_asset_contract', TronUnfreezeAssetContract, 0), | ||
15: ('update_asset_contract', TronUpdateAssetContract, 0), | ||
16: ('proposal_create_contract', TronProposalCreateContract, 0), | ||
17: ('proposal_approve_contract', TronProposalApproveContract, 0), | ||
18: ('proposal_delete_contract', TronProposalDeleteContract, 0), | ||
} | ||
|
||
def __init__( | ||
self, | ||
transfer_contract: TronTransferContract = None, | ||
transfer_asset_contract: TronTransferAssetContract = None, | ||
vote_witness_contract: TronVoteWitnessContract = None, | ||
witness_create_contract: TronWitnessCreateContract = None, | ||
asset_issue_contract: TronAssetIssueContract = None, | ||
witness_update_contract: TronWitnessUpdateContract = None, | ||
participate_asset_issue_contract: TronParticipateAssetIssueContract = None, | ||
account_update_contract: TronAccountUpdateContract = None, | ||
freeze_balance_contract: TronFreezeBalanceContract = None, | ||
unfreeze_balance_contract: TronUnfreezeBalanceContract = None, | ||
withdraw_balance_contract: TronWithdrawBalanceContract = None, | ||
unfreeze_asset_contract: TronUnfreezeAssetContract = None, | ||
update_asset_contract: TronUpdateAssetContract = None, | ||
proposal_create_contract: TronProposalCreateContract = None, | ||
proposal_approve_contract: TronProposalApproveContract = None, | ||
proposal_delete_contract: TronProposalDeleteContract = None, | ||
) -> None: | ||
self.transfer_contract = transfer_contract | ||
self.transfer_asset_contract = transfer_asset_contract | ||
self.vote_witness_contract = vote_witness_contract | ||
self.witness_create_contract = witness_create_contract | ||
self.asset_issue_contract = asset_issue_contract | ||
self.witness_update_contract = witness_update_contract | ||
self.participate_asset_issue_contract = participate_asset_issue_contract | ||
self.account_update_contract = account_update_contract | ||
self.freeze_balance_contract = freeze_balance_contract | ||
self.unfreeze_balance_contract = unfreeze_balance_contract | ||
self.withdraw_balance_contract = withdraw_balance_contract | ||
self.unfreeze_asset_contract = unfreeze_asset_contract | ||
self.update_asset_contract = update_asset_contract | ||
self.proposal_create_contract = proposal_create_contract | ||
self.proposal_approve_contract = proposal_approve_contract | ||
self.proposal_delete_contract = proposal_delete_contract |
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,18 @@ | ||
# Automatically generated by pb2py | ||
# fmt: off | ||
import protobuf as p | ||
|
||
|
||
class TronFreezeBalanceContract(p.MessageType): | ||
FIELDS = { | ||
1: ('frozen_balance', p.UVarintType, 0), | ||
2: ('frozen_duration', p.UVarintType, 0), | ||
} | ||
|
||
def __init__( | ||
self, | ||
frozen_balance: int = None, | ||
frozen_duration: int = None, | ||
) -> None: | ||
self.frozen_balance = frozen_balance | ||
self.frozen_duration = frozen_duration |
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,18 @@ | ||
# Automatically generated by pb2py | ||
# fmt: off | ||
import protobuf as p | ||
|
||
|
||
class TronFrozenSupply(p.MessageType): | ||
FIELDS = { | ||
1: ('frozen_amount', p.UVarintType, 0), | ||
2: ('frozen_days', p.UVarintType, 0), | ||
} | ||
|
||
def __init__( | ||
self, | ||
frozen_amount: int = None, | ||
frozen_days: int = None, | ||
) -> None: | ||
self.frozen_amount = frozen_amount | ||
self.frozen_days = frozen_days |
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,21 @@ | ||
# Automatically generated by pb2py | ||
# fmt: off | ||
import protobuf as p | ||
|
||
|
||
class TronParticipateAssetIssueContract(p.MessageType): | ||
FIELDS = { | ||
1: ('to_address', p.BytesType, 0), | ||
2: ('asset_name', p.UnicodeType, 0), | ||
3: ('amount', p.UVarintType, 0), | ||
} | ||
|
||
def __init__( | ||
self, | ||
to_address: bytes = None, | ||
asset_name: str = None, | ||
amount: int = None, | ||
) -> None: | ||
self.to_address = to_address | ||
self.asset_name = asset_name | ||
self.amount = amount |
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,18 @@ | ||
# Automatically generated by pb2py | ||
# fmt: off | ||
import protobuf as p | ||
|
||
|
||
class TronProposalApproveContract(p.MessageType): | ||
FIELDS = { | ||
1: ('proposal_id', p.UVarintType, 0), | ||
2: ('is_add_approval', p.BoolType, 0), | ||
} | ||
|
||
def __init__( | ||
self, | ||
proposal_id: int = None, | ||
is_add_approval: bool = None, | ||
) -> None: | ||
self.proposal_id = proposal_id | ||
self.is_add_approval = is_add_approval |
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,23 @@ | ||
# Automatically generated by pb2py | ||
# fmt: off | ||
import protobuf as p | ||
|
||
from .TronProposalParameters import TronProposalParameters | ||
|
||
if __debug__: | ||
try: | ||
from typing import List | ||
except ImportError: | ||
List = None # type: ignore | ||
|
||
|
||
class TronProposalCreateContract(p.MessageType): | ||
FIELDS = { | ||
1: ('parameters', TronProposalParameters, p.FLAG_REPEATED), | ||
} | ||
|
||
def __init__( | ||
self, | ||
parameters: List[TronProposalParameters] = None, | ||
) -> None: | ||
self.parameters = parameters if parameters is not None else [] |
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,15 @@ | ||
# Automatically generated by pb2py | ||
# fmt: off | ||
import protobuf as p | ||
|
||
|
||
class TronProposalDeleteContract(p.MessageType): | ||
FIELDS = { | ||
1: ('proposal_id', p.UVarintType, 0), | ||
} | ||
|
||
def __init__( | ||
self, | ||
proposal_id: int = None, | ||
) -> None: | ||
self.proposal_id = proposal_id |
Oops, something went wrong.