helium_py.proto.BlockchainTxn¶
- class helium_py.proto.BlockchainTxn(add_gateway: 'BlockchainTxnAddGatewayV1' = <object object at 0x7fdce1e05210>, assert_location: 'BlockchainTxnAssertLocationV1' = <object object at 0x7fdce1e05210>, coinbase: 'BlockchainTxnCoinbaseV1' = <object object at 0x7fdce1e05210>, create_htlc: 'BlockchainTxnCreateHtlcV1' = <object object at 0x7fdce1e05210>, gen_gateway: 'BlockchainTxnGenGatewayV1' = <object object at 0x7fdce1e05210>, consensus_group: 'BlockchainTxnConsensusGroupV1' = <object object at 0x7fdce1e05210>, oui: 'BlockchainTxnOuiV1' = <object object at 0x7fdce1e05210>, payment: 'BlockchainTxnPaymentV1' = <object object at 0x7fdce1e05210>, poc_receipts: 'BlockchainTxnPocReceiptsV1' = <object object at 0x7fdce1e05210>, poc_request: 'BlockchainTxnPocRequestV1' = <object object at 0x7fdce1e05210>, redeem_htlc: 'BlockchainTxnRedeemHtlcV1' = <object object at 0x7fdce1e05210>, security_coinbase: 'BlockchainTxnSecurityCoinbaseV1' = <object object at 0x7fdce1e05210>, routing: 'BlockchainTxnRoutingV1' = <object object at 0x7fdce1e05210>, security_exchange: 'BlockchainTxnSecurityExchangeV1' = <object object at 0x7fdce1e05210>, vars: 'BlockchainTxnVarsV1' = <object object at 0x7fdce1e05210>, rewards: 'BlockchainTxnRewardsV1' = <object object at 0x7fdce1e05210>, token_burn: 'BlockchainTxnTokenBurnV1' = <object object at 0x7fdce1e05210>, dc_coinbase: 'BlockchainTxnDcCoinbaseV1' = <object object at 0x7fdce1e05210>, token_burn_exchange_rate: 'BlockchainTxnTokenBurnExchangeRateV1' = <object object at 0x7fdce1e05210>, bundle: 'BlockchainTxnBundleV1' = <object object at 0x7fdce1e05210>, state_channel_open: 'BlockchainTxnStateChannelOpenV1' = <object object at 0x7fdce1e05210>, update_gateway_oui: 'BlockchainTxnUpdateGatewayOuiV1' = <object object at 0x7fdce1e05210>, state_channel_close: 'BlockchainTxnStateChannelCloseV1' = <object object at 0x7fdce1e05210>, payment_v2: 'BlockchainTxnPaymentV2' = <object object at 0x7fdce1e05210>, price_oracle_submission: 'BlockchainTxnPriceOracleV1' = <object object at 0x7fdce1e05210>, gen_price_oracle: 'BlockchainTxnGenPriceOracleV1' = <object object at 0x7fdce1e05210>, transfer_hotspot: 'BlockchainTxnTransferHotspotV1' = <object object at 0x7fdce1e05210>, gen_validator: 'BlockchainTxnGenValidatorV1' = <object object at 0x7fdce1e05210>, stake_validator: 'BlockchainTxnStakeValidatorV1' = <object object at 0x7fdce1e05210>, transfer_val_stake: 'BlockchainTxnTransferValidatorStakeV1' = <object object at 0x7fdce1e05210>, unstake_validator: 'BlockchainTxnUnstakeValidatorV1' = <object object at 0x7fdce1e05210>, val_heartbeat: 'BlockchainTxnValidatorHeartbeatV1' = <object object at 0x7fdce1e05210>, consensus_group_failure: 'BlockchainTxnConsensusGroupFailureV1' = <object object at 0x7fdce1e05210>, rewards_v2: 'BlockchainTxnRewardsV2' = <object object at 0x7fdce1e05210>, assert_location_v2: 'BlockchainTxnAssertLocationV2' = <object object at 0x7fdce1e05210>, transfer_hotspot_v2: 'BlockchainTxnTransferHotspotV2' = <object object at 0x7fdce1e05210>)[source]¶
Bases:
Message- __init__(add_gateway: ~helium_py.proto.BlockchainTxnAddGatewayV1 = <object object>, assert_location: ~helium_py.proto.BlockchainTxnAssertLocationV1 = <object object>, coinbase: ~helium_py.proto.BlockchainTxnCoinbaseV1 = <object object>, create_htlc: ~helium_py.proto.BlockchainTxnCreateHtlcV1 = <object object>, gen_gateway: ~helium_py.proto.BlockchainTxnGenGatewayV1 = <object object>, consensus_group: ~helium_py.proto.BlockchainTxnConsensusGroupV1 = <object object>, oui: ~helium_py.proto.BlockchainTxnOuiV1 = <object object>, payment: ~helium_py.proto.BlockchainTxnPaymentV1 = <object object>, poc_receipts: ~helium_py.proto.BlockchainTxnPocReceiptsV1 = <object object>, poc_request: ~helium_py.proto.BlockchainTxnPocRequestV1 = <object object>, redeem_htlc: ~helium_py.proto.BlockchainTxnRedeemHtlcV1 = <object object>, security_coinbase: ~helium_py.proto.BlockchainTxnSecurityCoinbaseV1 = <object object>, routing: ~helium_py.proto.BlockchainTxnRoutingV1 = <object object>, security_exchange: ~helium_py.proto.BlockchainTxnSecurityExchangeV1 = <object object>, vars: ~helium_py.proto.BlockchainTxnVarsV1 = <object object>, rewards: ~helium_py.proto.BlockchainTxnRewardsV1 = <object object>, token_burn: ~helium_py.proto.BlockchainTxnTokenBurnV1 = <object object>, dc_coinbase: ~helium_py.proto.BlockchainTxnDcCoinbaseV1 = <object object>, token_burn_exchange_rate: ~helium_py.proto.BlockchainTxnTokenBurnExchangeRateV1 = <object object>, bundle: ~helium_py.proto.BlockchainTxnBundleV1 = <object object>, state_channel_open: ~helium_py.proto.BlockchainTxnStateChannelOpenV1 = <object object>, update_gateway_oui: ~helium_py.proto.BlockchainTxnUpdateGatewayOuiV1 = <object object>, state_channel_close: ~helium_py.proto.BlockchainTxnStateChannelCloseV1 = <object object>, payment_v2: ~helium_py.proto.BlockchainTxnPaymentV2 = <object object>, price_oracle_submission: ~helium_py.proto.BlockchainTxnPriceOracleV1 = <object object>, gen_price_oracle: ~helium_py.proto.BlockchainTxnGenPriceOracleV1 = <object object>, transfer_hotspot: ~helium_py.proto.BlockchainTxnTransferHotspotV1 = <object object>, gen_validator: ~helium_py.proto.BlockchainTxnGenValidatorV1 = <object object>, stake_validator: ~helium_py.proto.BlockchainTxnStakeValidatorV1 = <object object>, transfer_val_stake: ~helium_py.proto.BlockchainTxnTransferValidatorStakeV1 = <object object>, unstake_validator: ~helium_py.proto.BlockchainTxnUnstakeValidatorV1 = <object object>, val_heartbeat: ~helium_py.proto.BlockchainTxnValidatorHeartbeatV1 = <object object>, consensus_group_failure: ~helium_py.proto.BlockchainTxnConsensusGroupFailureV1 = <object object>, rewards_v2: ~helium_py.proto.BlockchainTxnRewardsV2 = <object object>, assert_location_v2: ~helium_py.proto.BlockchainTxnAssertLocationV2 = <object object>, transfer_hotspot_v2: ~helium_py.proto.BlockchainTxnTransferHotspotV2 = <object object>) None¶
Methods
FromString(data)Parse the binary encoded Protobuf into this message instance.
Get the binary encoded Protobuf representation of this message instance.
__init__([add_gateway, assert_location, ...])from_dict(value)Parse the key/value pairs into the current message instance.
from_json(value)A helper function to return the message instance from its JSON representation.
parse(data)Parse the binary encoded Protobuf into this message instance.
to_dict([casing, include_default_values])Returns a JSON serializable dict representation of this object.
to_json([indent])A helper function to parse the message instance into its JSON representation.
Attributes
add_gatewayassert_locationassert_location_v2bundlecoinbaseconsensus_groupconsensus_group_failurecreate_htlcdc_coinbasegen_gatewaygen_price_oraclegen_validatorouipaymentpayment_v2poc_receiptspoc_requestprice_oracle_submissionredeem_htlcrewardsrewards_v2routingsecurity_coinbasesecurity_exchangestake_validatorstate_channel_closestate_channel_opentoken_burntoken_burn_exchange_ratetransfer_hotspottransfer_hotspot_v2transfer_val_stakeunstake_validatorupdate_gateway_ouival_heartbeatvars- classmethod FromString(data: bytes) T¶
Parse the binary encoded Protobuf into this message instance. This returns the instance itself and is therefore assignable and chainable.
Note
This is a method for compatibility with other libraries, you should really use
parse().- data:
bytes The data to parse the protobuf from.
MessageThe initialized message.
- data:
- SerializeToString() bytes¶
Get the binary encoded Protobuf representation of this message instance.
Note
This is a method for compatibility with other libraries, you should really use
bytes(x).bytesThe binary encoded Protobuf representation of this message instance
- from_dict(value: Dict[str, Any]) T¶
Parse the key/value pairs into the current message instance. This returns the instance itself and is therefore assignable and chainable.
- value: Dict[
str, Any] The dictionary to parse from.
MessageThe initialized message.
- value: Dict[
- from_json(value: Union[str, bytes]) T¶
A helper function to return the message instance from its JSON representation. This returns the instance itself and is therefore assignable and chainable.
This is equivalent to:
return message.from_dict(json.loads(value))
- value: Union[
str,bytes] The value to pass to
json.loads().
MessageThe initialized message.
- value: Union[
- parse(data: bytes) T¶
Parse the binary encoded Protobuf into this message instance. This returns the instance itself and is therefore assignable and chainable.
- data:
bytes The data to parse the protobuf from.
MessageThe initialized message.
- data:
- to_dict(casing: ~betterproto.Casing = <function camel_case>, include_default_values: bool = False) Dict[str, Any]¶
Returns a JSON serializable dict representation of this object.
- casing:
Casing The casing to use for key values. Default is
Casing.CAMELfor compatibility purposes.- include_default_values:
bool If
Truewill include the default values of fields. Default isFalse. E.g. anint32field will be included with a value of0if this is set toTrue, otherwise this would be ignored.
- Dict[
str, Any] The JSON serializable dict representation of this object.
- casing:
- to_json(indent: Union[None, int, str] = None) str¶
A helper function to parse the message instance into its JSON representation.
This is equivalent to:
json.dumps(message.to_dict(), indent=indent)
- indent: Optional[Union[
int,str]] The indent to pass to
json.dumps().
strThe JSON representation of the message.
- indent: Optional[Union[