tron

package
v0.12.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ResourceCode_name = map[int32]string{
		0: "BANDWIDTH",
		1: "ENERGY",
	}
	ResourceCode_value = map[string]int32{
		"BANDWIDTH": 0,
		"ENERGY":    1,
	}
)

Enum value maps for ResourceCode.

View Source
var File_txproto_tron_tron_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type BlockHeader

type BlockHeader struct {
	Timestamp      int64  `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	TxTrieRoot     []byte `protobuf:"bytes,2,opt,name=tx_trie_root,json=txTrieRoot,proto3" json:"tx_trie_root,omitempty"`
	ParentHash     []byte `protobuf:"bytes,3,opt,name=parent_hash,json=parentHash,proto3" json:"parent_hash,omitempty"`
	Number         int64  `protobuf:"varint,4,opt,name=number,proto3" json:"number,omitempty"`
	WitnessAddress []byte `protobuf:"bytes,5,opt,name=witness_address,json=witnessAddress,proto3" json:"witness_address,omitempty"`
	Version        int32  `protobuf:"varint,6,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

Block header reference values, used to compute ref_block_bytes / ref_block_hash.

func (*BlockHeader) Descriptor deprecated

func (*BlockHeader) Descriptor() ([]byte, []int)

Deprecated: Use BlockHeader.ProtoReflect.Descriptor instead.

func (*BlockHeader) GetNumber

func (x *BlockHeader) GetNumber() int64

func (*BlockHeader) GetParentHash

func (x *BlockHeader) GetParentHash() []byte

func (*BlockHeader) GetTimestamp

func (x *BlockHeader) GetTimestamp() int64

func (*BlockHeader) GetTxTrieRoot

func (x *BlockHeader) GetTxTrieRoot() []byte

func (*BlockHeader) GetVersion

func (x *BlockHeader) GetVersion() int32

func (*BlockHeader) GetWitnessAddress

func (x *BlockHeader) GetWitnessAddress() []byte

func (*BlockHeader) ProtoMessage

func (*BlockHeader) ProtoMessage()

func (*BlockHeader) ProtoReflect

func (x *BlockHeader) ProtoReflect() protoreflect.Message

func (*BlockHeader) Reset

func (x *BlockHeader) Reset()

func (*BlockHeader) String

func (x *BlockHeader) String() string

type DelegateResourceContract added in v0.10.0

type DelegateResourceContract struct {
	OwnerAddress    string       `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` // base58check (T...)
	Resource        ResourceCode `protobuf:"varint,2,opt,name=resource,proto3,enum=hdwallet.tron.proto.ResourceCode" json:"resource,omitempty"`
	Balance         int64        `protobuf:"varint,3,opt,name=balance,proto3" json:"balance,omitempty"`                                       // SUN
	ReceiverAddress string       `protobuf:"bytes,4,opt,name=receiver_address,json=receiverAddress,proto3" json:"receiver_address,omitempty"` // base58check (T...)
	Lock            bool         `protobuf:"varint,5,opt,name=lock,proto3" json:"lock,omitempty"`                                             // true = lock delegation for 3 days
	// contains filtered or unexported fields
}

Stake 2.0: delegate resources to another account.

func (*DelegateResourceContract) Descriptor deprecated added in v0.10.0

func (*DelegateResourceContract) Descriptor() ([]byte, []int)

Deprecated: Use DelegateResourceContract.ProtoReflect.Descriptor instead.

func (*DelegateResourceContract) GetBalance added in v0.10.0

func (x *DelegateResourceContract) GetBalance() int64

func (*DelegateResourceContract) GetLock added in v0.10.0

func (x *DelegateResourceContract) GetLock() bool

func (*DelegateResourceContract) GetOwnerAddress added in v0.10.0

func (x *DelegateResourceContract) GetOwnerAddress() string

func (*DelegateResourceContract) GetReceiverAddress added in v0.10.0

func (x *DelegateResourceContract) GetReceiverAddress() string

func (*DelegateResourceContract) GetResource added in v0.10.0

func (x *DelegateResourceContract) GetResource() ResourceCode

func (*DelegateResourceContract) ProtoMessage added in v0.10.0

func (*DelegateResourceContract) ProtoMessage()

func (*DelegateResourceContract) ProtoReflect added in v0.10.0

func (x *DelegateResourceContract) ProtoReflect() protoreflect.Message

func (*DelegateResourceContract) Reset added in v0.10.0

func (x *DelegateResourceContract) Reset()

func (*DelegateResourceContract) String added in v0.10.0

func (x *DelegateResourceContract) String() string

type FreezeBalanceContract added in v0.12.0

type FreezeBalanceContract struct {
	OwnerAddress    string       `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`            // base58check (T...)
	FrozenBalance   int64        `protobuf:"varint,2,opt,name=frozen_balance,json=frozenBalance,proto3" json:"frozen_balance,omitempty"`        // SUN (1 TRX = 1,000,000 SUN)
	FrozenDuration  int64        `protobuf:"varint,3,opt,name=frozen_duration,json=frozenDuration,proto3" json:"frozen_duration,omitempty"`     // days
	Resource        ResourceCode `protobuf:"varint,4,opt,name=resource,proto3,enum=hdwallet.tron.proto.ResourceCode" json:"resource,omitempty"` // BANDWIDTH or ENERGY
	ReceiverAddress string       `protobuf:"bytes,5,opt,name=receiver_address,json=receiverAddress,proto3" json:"receiver_address,omitempty"`   // optional delegate target; "" = self
	// contains filtered or unexported fields
}

Legacy Stake 1.0: freeze TRX to obtain resources (BANDWIDTH or ENERGY).

func (*FreezeBalanceContract) Descriptor deprecated added in v0.12.0

func (*FreezeBalanceContract) Descriptor() ([]byte, []int)

Deprecated: Use FreezeBalanceContract.ProtoReflect.Descriptor instead.

func (*FreezeBalanceContract) GetFrozenBalance added in v0.12.0

func (x *FreezeBalanceContract) GetFrozenBalance() int64

func (*FreezeBalanceContract) GetFrozenDuration added in v0.12.0

func (x *FreezeBalanceContract) GetFrozenDuration() int64

func (*FreezeBalanceContract) GetOwnerAddress added in v0.12.0

func (x *FreezeBalanceContract) GetOwnerAddress() string

func (*FreezeBalanceContract) GetReceiverAddress added in v0.12.0

func (x *FreezeBalanceContract) GetReceiverAddress() string

func (*FreezeBalanceContract) GetResource added in v0.12.0

func (x *FreezeBalanceContract) GetResource() ResourceCode

func (*FreezeBalanceContract) ProtoMessage added in v0.12.0

func (*FreezeBalanceContract) ProtoMessage()

func (*FreezeBalanceContract) ProtoReflect added in v0.12.0

func (x *FreezeBalanceContract) ProtoReflect() protoreflect.Message

func (*FreezeBalanceContract) Reset added in v0.12.0

func (x *FreezeBalanceContract) Reset()

func (*FreezeBalanceContract) String added in v0.12.0

func (x *FreezeBalanceContract) String() string

type FreezeBalanceV2Contract added in v0.10.0

type FreezeBalanceV2Contract struct {
	OwnerAddress  string       `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`     // base58check (T...)
	FrozenBalance int64        `protobuf:"varint,2,opt,name=frozen_balance,json=frozenBalance,proto3" json:"frozen_balance,omitempty"` // SUN (1 TRX = 1,000,000 SUN)
	Resource      ResourceCode `protobuf:"varint,3,opt,name=resource,proto3,enum=hdwallet.tron.proto.ResourceCode" json:"resource,omitempty"`
	// contains filtered or unexported fields
}

Stake 2.0: freeze TRX to obtain resources (BANDWIDTH or ENERGY).

func (*FreezeBalanceV2Contract) Descriptor deprecated added in v0.10.0

func (*FreezeBalanceV2Contract) Descriptor() ([]byte, []int)

Deprecated: Use FreezeBalanceV2Contract.ProtoReflect.Descriptor instead.

func (*FreezeBalanceV2Contract) GetFrozenBalance added in v0.10.0

func (x *FreezeBalanceV2Contract) GetFrozenBalance() int64

func (*FreezeBalanceV2Contract) GetOwnerAddress added in v0.10.0

func (x *FreezeBalanceV2Contract) GetOwnerAddress() string

func (*FreezeBalanceV2Contract) GetResource added in v0.10.0

func (x *FreezeBalanceV2Contract) GetResource() ResourceCode

func (*FreezeBalanceV2Contract) ProtoMessage added in v0.10.0

func (*FreezeBalanceV2Contract) ProtoMessage()

func (*FreezeBalanceV2Contract) ProtoReflect added in v0.10.0

func (x *FreezeBalanceV2Contract) ProtoReflect() protoreflect.Message

func (*FreezeBalanceV2Contract) Reset added in v0.10.0

func (x *FreezeBalanceV2Contract) Reset()

func (*FreezeBalanceV2Contract) String added in v0.10.0

func (x *FreezeBalanceV2Contract) String() string

type ResourceCode added in v0.10.0

type ResourceCode int32

ResourceCode for Stake 2.0 operations.

const (
	ResourceCode_BANDWIDTH ResourceCode = 0
	ResourceCode_ENERGY    ResourceCode = 1
)

func (ResourceCode) Descriptor added in v0.10.0

func (ResourceCode) Enum added in v0.10.0

func (x ResourceCode) Enum() *ResourceCode

func (ResourceCode) EnumDescriptor deprecated added in v0.10.0

func (ResourceCode) EnumDescriptor() ([]byte, []int)

Deprecated: Use ResourceCode.Descriptor instead.

func (ResourceCode) Number added in v0.10.0

func (ResourceCode) String added in v0.10.0

func (x ResourceCode) String() string

func (ResourceCode) Type added in v0.10.0

type SigningInput

type SigningInput struct {
	Transaction *Transaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"`
	RawJson     string       `protobuf:"bytes,2,opt,name=raw_json,json=rawJson,proto3" json:"raw_json,omitempty"` // raw transaction JSON from a Tron node / DApp
	// contains filtered or unexported fields
}

SigningInput mirrors a minimal subset of TW.Tron.Proto.SigningInput.

func (*SigningInput) Descriptor deprecated

func (*SigningInput) Descriptor() ([]byte, []int)

Deprecated: Use SigningInput.ProtoReflect.Descriptor instead.

func (*SigningInput) GetRawJson added in v0.12.0

func (x *SigningInput) GetRawJson() string

func (*SigningInput) GetTransaction

func (x *SigningInput) GetTransaction() *Transaction

func (*SigningInput) ProtoMessage

func (*SigningInput) ProtoMessage()

func (*SigningInput) ProtoReflect

func (x *SigningInput) ProtoReflect() protoreflect.Message

func (*SigningInput) Reset

func (x *SigningInput) Reset()

func (*SigningInput) String

func (x *SigningInput) String() string

type SigningOutput

type SigningOutput struct {
	Id            []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`                          // txID = sha256(raw_data)
	Signature     []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`            // 65-byte recoverable signature
	RawData       []byte `protobuf:"bytes,3,opt,name=raw_data,json=rawData,proto3" json:"raw_data,omitempty"` // protobuf-serialized raw transaction
	RefBlockBytes string `protobuf:"bytes,4,opt,name=ref_block_bytes,json=refBlockBytes,proto3" json:"ref_block_bytes,omitempty"`
	Json          string `protobuf:"bytes,5,opt,name=json,proto3" json:"json,omitempty"` // convenience JSON
	Error         string `protobuf:"bytes,6,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

SigningOutput mirrors a minimal subset of TW.Tron.Proto.SigningOutput.

func (*SigningOutput) Descriptor deprecated

func (*SigningOutput) Descriptor() ([]byte, []int)

Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead.

func (*SigningOutput) GetError

func (x *SigningOutput) GetError() string

func (*SigningOutput) GetId

func (x *SigningOutput) GetId() []byte

func (*SigningOutput) GetJson

func (x *SigningOutput) GetJson() string

func (*SigningOutput) GetRawData

func (x *SigningOutput) GetRawData() []byte

func (*SigningOutput) GetRefBlockBytes

func (x *SigningOutput) GetRefBlockBytes() string

func (*SigningOutput) GetSignature

func (x *SigningOutput) GetSignature() []byte

func (*SigningOutput) ProtoMessage

func (*SigningOutput) ProtoMessage()

func (*SigningOutput) ProtoReflect

func (x *SigningOutput) ProtoReflect() protoreflect.Message

func (*SigningOutput) Reset

func (x *SigningOutput) Reset()

func (*SigningOutput) String

func (x *SigningOutput) String() string

type Transaction

type Transaction struct {
	Timestamp   int64        `protobuf:"varint,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	Expiration  int64        `protobuf:"varint,2,opt,name=expiration,proto3" json:"expiration,omitempty"`
	BlockHeader *BlockHeader `protobuf:"bytes,3,opt,name=block_header,json=blockHeader,proto3" json:"block_header,omitempty"`
	FeeLimit    int64        `protobuf:"varint,4,opt,name=fee_limit,json=feeLimit,proto3" json:"fee_limit,omitempty"`
	// Types that are valid to be assigned to ContractOneof:
	//
	//	*Transaction_Transfer
	//	*Transaction_TransferTrc20
	//	*Transaction_TransferAsset
	//	*Transaction_FreezeBalanceV2
	//	*Transaction_UnfreezeBalanceV2
	//	*Transaction_DelegateResource
	//	*Transaction_UndelegateResource
	//	*Transaction_VoteWitness
	//	*Transaction_WithdrawExpireUnfreeze
	//	*Transaction_TriggerSmartContract
	//	*Transaction_FreezeBalance
	//	*Transaction_UnfreezeBalance
	//	*Transaction_UnfreezeAsset
	//	*Transaction_WithdrawBalance
	//	*Transaction_VoteAsset
	ContractOneof isTransaction_ContractOneof `protobuf_oneof:"contract_oneof"`
	// contains filtered or unexported fields
}

Transaction payload selector.

func (*Transaction) Descriptor deprecated

func (*Transaction) Descriptor() ([]byte, []int)

Deprecated: Use Transaction.ProtoReflect.Descriptor instead.

func (*Transaction) GetBlockHeader

func (x *Transaction) GetBlockHeader() *BlockHeader

func (*Transaction) GetContractOneof

func (x *Transaction) GetContractOneof() isTransaction_ContractOneof

func (*Transaction) GetDelegateResource added in v0.10.0

func (x *Transaction) GetDelegateResource() *DelegateResourceContract

func (*Transaction) GetExpiration

func (x *Transaction) GetExpiration() int64

func (*Transaction) GetFeeLimit

func (x *Transaction) GetFeeLimit() int64

func (*Transaction) GetFreezeBalance added in v0.12.0

func (x *Transaction) GetFreezeBalance() *FreezeBalanceContract

func (*Transaction) GetFreezeBalanceV2 added in v0.10.0

func (x *Transaction) GetFreezeBalanceV2() *FreezeBalanceV2Contract

func (*Transaction) GetTimestamp

func (x *Transaction) GetTimestamp() int64

func (*Transaction) GetTransfer

func (x *Transaction) GetTransfer() *TransferContract

func (*Transaction) GetTransferAsset added in v0.10.0

func (x *Transaction) GetTransferAsset() *TransferAssetContract

func (*Transaction) GetTransferTrc20 added in v0.3.0

func (x *Transaction) GetTransferTrc20() *TransferTRC20Contract

func (*Transaction) GetTriggerSmartContract added in v0.12.0

func (x *Transaction) GetTriggerSmartContract() *TriggerSmartContract

func (*Transaction) GetUndelegateResource added in v0.10.0

func (x *Transaction) GetUndelegateResource() *UndelegateResourceContract

func (*Transaction) GetUnfreezeAsset added in v0.12.0

func (x *Transaction) GetUnfreezeAsset() *UnfreezeAssetContract

func (*Transaction) GetUnfreezeBalance added in v0.12.0

func (x *Transaction) GetUnfreezeBalance() *UnfreezeBalanceContract

func (*Transaction) GetUnfreezeBalanceV2 added in v0.10.0

func (x *Transaction) GetUnfreezeBalanceV2() *UnfreezeBalanceV2Contract

func (*Transaction) GetVoteAsset added in v0.12.0

func (x *Transaction) GetVoteAsset() *VoteAssetContract

func (*Transaction) GetVoteWitness added in v0.10.0

func (x *Transaction) GetVoteWitness() *VoteWitnessContract

func (*Transaction) GetWithdrawBalance added in v0.12.0

func (x *Transaction) GetWithdrawBalance() *WithdrawBalanceContract

func (*Transaction) GetWithdrawExpireUnfreeze added in v0.10.0

func (x *Transaction) GetWithdrawExpireUnfreeze() *WithdrawExpireUnfreezeContract

func (*Transaction) ProtoMessage

func (*Transaction) ProtoMessage()

func (*Transaction) ProtoReflect

func (x *Transaction) ProtoReflect() protoreflect.Message

func (*Transaction) Reset

func (x *Transaction) Reset()

func (*Transaction) String

func (x *Transaction) String() string

type Transaction_DelegateResource added in v0.10.0

type Transaction_DelegateResource struct {
	DelegateResource *DelegateResourceContract `protobuf:"bytes,10,opt,name=delegate_resource,json=delegateResource,proto3,oneof"`
}

type Transaction_FreezeBalance added in v0.12.0

type Transaction_FreezeBalance struct {
	FreezeBalance *FreezeBalanceContract `protobuf:"bytes,15,opt,name=freeze_balance,json=freezeBalance,proto3,oneof"`
}

type Transaction_FreezeBalanceV2 added in v0.10.0

type Transaction_FreezeBalanceV2 struct {
	FreezeBalanceV2 *FreezeBalanceV2Contract `protobuf:"bytes,8,opt,name=freeze_balance_v2,json=freezeBalanceV2,proto3,oneof"`
}

type Transaction_Transfer

type Transaction_Transfer struct {
	Transfer *TransferContract `protobuf:"bytes,5,opt,name=transfer,proto3,oneof"`
}

type Transaction_TransferAsset added in v0.10.0

type Transaction_TransferAsset struct {
	TransferAsset *TransferAssetContract `protobuf:"bytes,7,opt,name=transfer_asset,json=transferAsset,proto3,oneof"`
}

type Transaction_TransferTrc20 added in v0.3.0

type Transaction_TransferTrc20 struct {
	TransferTrc20 *TransferTRC20Contract `protobuf:"bytes,6,opt,name=transfer_trc20,json=transferTrc20,proto3,oneof"`
}

type Transaction_TriggerSmartContract added in v0.12.0

type Transaction_TriggerSmartContract struct {
	TriggerSmartContract *TriggerSmartContract `protobuf:"bytes,14,opt,name=trigger_smart_contract,json=triggerSmartContract,proto3,oneof"`
}

type Transaction_UndelegateResource added in v0.10.0

type Transaction_UndelegateResource struct {
	UndelegateResource *UndelegateResourceContract `protobuf:"bytes,11,opt,name=undelegate_resource,json=undelegateResource,proto3,oneof"`
}

type Transaction_UnfreezeAsset added in v0.12.0

type Transaction_UnfreezeAsset struct {
	UnfreezeAsset *UnfreezeAssetContract `protobuf:"bytes,17,opt,name=unfreeze_asset,json=unfreezeAsset,proto3,oneof"`
}

type Transaction_UnfreezeBalance added in v0.12.0

type Transaction_UnfreezeBalance struct {
	UnfreezeBalance *UnfreezeBalanceContract `protobuf:"bytes,16,opt,name=unfreeze_balance,json=unfreezeBalance,proto3,oneof"`
}

type Transaction_UnfreezeBalanceV2 added in v0.10.0

type Transaction_UnfreezeBalanceV2 struct {
	UnfreezeBalanceV2 *UnfreezeBalanceV2Contract `protobuf:"bytes,9,opt,name=unfreeze_balance_v2,json=unfreezeBalanceV2,proto3,oneof"`
}

type Transaction_VoteAsset added in v0.12.0

type Transaction_VoteAsset struct {
	VoteAsset *VoteAssetContract `protobuf:"bytes,19,opt,name=vote_asset,json=voteAsset,proto3,oneof"`
}

type Transaction_VoteWitness added in v0.10.0

type Transaction_VoteWitness struct {
	VoteWitness *VoteWitnessContract `protobuf:"bytes,12,opt,name=vote_witness,json=voteWitness,proto3,oneof"`
}

type Transaction_WithdrawBalance added in v0.12.0

type Transaction_WithdrawBalance struct {
	WithdrawBalance *WithdrawBalanceContract `protobuf:"bytes,18,opt,name=withdraw_balance,json=withdrawBalance,proto3,oneof"`
}

type Transaction_WithdrawExpireUnfreeze added in v0.10.0

type Transaction_WithdrawExpireUnfreeze struct {
	WithdrawExpireUnfreeze *WithdrawExpireUnfreezeContract `protobuf:"bytes,13,opt,name=withdraw_expire_unfreeze,json=withdrawExpireUnfreeze,proto3,oneof"`
}

type TransferAssetContract added in v0.10.0

type TransferAssetContract struct {
	AssetName    string `protobuf:"bytes,1,opt,name=asset_name,json=assetName,proto3" json:"asset_name,omitempty"`          // TRC-10 asset ID string, e.g. "1000001"
	OwnerAddress string `protobuf:"bytes,2,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` // base58check (T...)
	ToAddress    string `protobuf:"bytes,3,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"`          // base58check (T...)
	Amount       int64  `protobuf:"varint,4,opt,name=amount,proto3" json:"amount,omitempty"`                                // token units
	// contains filtered or unexported fields
}

TRC-10 token transfer (TransferAssetContract). Addresses are base58check (T...).

func (*TransferAssetContract) Descriptor deprecated added in v0.10.0

func (*TransferAssetContract) Descriptor() ([]byte, []int)

Deprecated: Use TransferAssetContract.ProtoReflect.Descriptor instead.

func (*TransferAssetContract) GetAmount added in v0.10.0

func (x *TransferAssetContract) GetAmount() int64

func (*TransferAssetContract) GetAssetName added in v0.10.0

func (x *TransferAssetContract) GetAssetName() string

func (*TransferAssetContract) GetOwnerAddress added in v0.10.0

func (x *TransferAssetContract) GetOwnerAddress() string

func (*TransferAssetContract) GetToAddress added in v0.10.0

func (x *TransferAssetContract) GetToAddress() string

func (*TransferAssetContract) ProtoMessage added in v0.10.0

func (*TransferAssetContract) ProtoMessage()

func (*TransferAssetContract) ProtoReflect added in v0.10.0

func (x *TransferAssetContract) ProtoReflect() protoreflect.Message

func (*TransferAssetContract) Reset added in v0.10.0

func (x *TransferAssetContract) Reset()

func (*TransferAssetContract) String added in v0.10.0

func (x *TransferAssetContract) String() string

type TransferContract

type TransferContract struct {
	OwnerAddress string `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` // base58check (T...)
	ToAddress    string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"`          // base58check (T...)
	Amount       int64  `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"`                                // in SUN
	// contains filtered or unexported fields
}

TRX transfer (TransferContract).

func (*TransferContract) Descriptor deprecated

func (*TransferContract) Descriptor() ([]byte, []int)

Deprecated: Use TransferContract.ProtoReflect.Descriptor instead.

func (*TransferContract) GetAmount

func (x *TransferContract) GetAmount() int64

func (*TransferContract) GetOwnerAddress

func (x *TransferContract) GetOwnerAddress() string

func (*TransferContract) GetToAddress

func (x *TransferContract) GetToAddress() string

func (*TransferContract) ProtoMessage

func (*TransferContract) ProtoMessage()

func (*TransferContract) ProtoReflect

func (x *TransferContract) ProtoReflect() protoreflect.Message

func (*TransferContract) Reset

func (x *TransferContract) Reset()

func (*TransferContract) String

func (x *TransferContract) String() string

type TransferTRC20Contract added in v0.3.0

type TransferTRC20Contract struct {
	OwnerAddress    string `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`          // sender (T...)
	ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` // the TRC-20 token contract (T...)
	ToAddress       string `protobuf:"bytes,3,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"`                   // recipient (T...)
	Amount          []byte `protobuf:"bytes,4,opt,name=amount,proto3" json:"amount,omitempty"`                                          // big-endian uint256
	// contains filtered or unexported fields
}

TRC-20 token transfer, built as a TriggerSmartContract calling the token's transfer(address,uint256). Addresses are base58check (T...).

func (*TransferTRC20Contract) Descriptor deprecated added in v0.3.0

func (*TransferTRC20Contract) Descriptor() ([]byte, []int)

Deprecated: Use TransferTRC20Contract.ProtoReflect.Descriptor instead.

func (*TransferTRC20Contract) GetAmount added in v0.3.0

func (x *TransferTRC20Contract) GetAmount() []byte

func (*TransferTRC20Contract) GetContractAddress added in v0.3.0

func (x *TransferTRC20Contract) GetContractAddress() string

func (*TransferTRC20Contract) GetOwnerAddress added in v0.3.0

func (x *TransferTRC20Contract) GetOwnerAddress() string

func (*TransferTRC20Contract) GetToAddress added in v0.3.0

func (x *TransferTRC20Contract) GetToAddress() string

func (*TransferTRC20Contract) ProtoMessage added in v0.3.0

func (*TransferTRC20Contract) ProtoMessage()

func (*TransferTRC20Contract) ProtoReflect added in v0.3.0

func (x *TransferTRC20Contract) ProtoReflect() protoreflect.Message

func (*TransferTRC20Contract) Reset added in v0.3.0

func (x *TransferTRC20Contract) Reset()

func (*TransferTRC20Contract) String added in v0.3.0

func (x *TransferTRC20Contract) String() string

type TriggerSmartContract added in v0.12.0

type TriggerSmartContract struct {
	OwnerAddress    string `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`          // T... or hex
	ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` // T... or hex
	CallValue       int64  `protobuf:"varint,3,opt,name=call_value,json=callValue,proto3" json:"call_value,omitempty"`                  // TRX (SUN) sent with the call
	Data            []byte `protobuf:"bytes,4,opt,name=data,proto3" json:"data,omitempty"`                                              // raw calldata
	CallTokenValue  int64  `protobuf:"varint,5,opt,name=call_token_value,json=callTokenValue,proto3" json:"call_token_value,omitempty"` // TRC-10 amount sent with the call
	TokenId         int64  `protobuf:"varint,6,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"`                        // TRC-10 token id
	// contains filtered or unexported fields
}

Generic smart-contract call (TriggerSmartContract). Supports TRX value, arbitrary calldata, and TRC-10 value attachment.

func (*TriggerSmartContract) Descriptor deprecated added in v0.12.0

func (*TriggerSmartContract) Descriptor() ([]byte, []int)

Deprecated: Use TriggerSmartContract.ProtoReflect.Descriptor instead.

func (*TriggerSmartContract) GetCallTokenValue added in v0.12.0

func (x *TriggerSmartContract) GetCallTokenValue() int64

func (*TriggerSmartContract) GetCallValue added in v0.12.0

func (x *TriggerSmartContract) GetCallValue() int64

func (*TriggerSmartContract) GetContractAddress added in v0.12.0

func (x *TriggerSmartContract) GetContractAddress() string

func (*TriggerSmartContract) GetData added in v0.12.0

func (x *TriggerSmartContract) GetData() []byte

func (*TriggerSmartContract) GetOwnerAddress added in v0.12.0

func (x *TriggerSmartContract) GetOwnerAddress() string

func (*TriggerSmartContract) GetTokenId added in v0.12.0

func (x *TriggerSmartContract) GetTokenId() int64

func (*TriggerSmartContract) ProtoMessage added in v0.12.0

func (*TriggerSmartContract) ProtoMessage()

func (*TriggerSmartContract) ProtoReflect added in v0.12.0

func (x *TriggerSmartContract) ProtoReflect() protoreflect.Message

func (*TriggerSmartContract) Reset added in v0.12.0

func (x *TriggerSmartContract) Reset()

func (*TriggerSmartContract) String added in v0.12.0

func (x *TriggerSmartContract) String() string

type UndelegateResourceContract added in v0.10.0

type UndelegateResourceContract struct {
	OwnerAddress    string       `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` // base58check (T...)
	Resource        ResourceCode `protobuf:"varint,2,opt,name=resource,proto3,enum=hdwallet.tron.proto.ResourceCode" json:"resource,omitempty"`
	Balance         int64        `protobuf:"varint,3,opt,name=balance,proto3" json:"balance,omitempty"`                                       // SUN
	ReceiverAddress string       `protobuf:"bytes,4,opt,name=receiver_address,json=receiverAddress,proto3" json:"receiver_address,omitempty"` // base58check (T...)
	// contains filtered or unexported fields
}

Stake 2.0: revoke delegated resources.

func (*UndelegateResourceContract) Descriptor deprecated added in v0.10.0

func (*UndelegateResourceContract) Descriptor() ([]byte, []int)

Deprecated: Use UndelegateResourceContract.ProtoReflect.Descriptor instead.

func (*UndelegateResourceContract) GetBalance added in v0.10.0

func (x *UndelegateResourceContract) GetBalance() int64

func (*UndelegateResourceContract) GetOwnerAddress added in v0.10.0

func (x *UndelegateResourceContract) GetOwnerAddress() string

func (*UndelegateResourceContract) GetReceiverAddress added in v0.10.0

func (x *UndelegateResourceContract) GetReceiverAddress() string

func (*UndelegateResourceContract) GetResource added in v0.10.0

func (x *UndelegateResourceContract) GetResource() ResourceCode

func (*UndelegateResourceContract) ProtoMessage added in v0.10.0

func (*UndelegateResourceContract) ProtoMessage()

func (*UndelegateResourceContract) ProtoReflect added in v0.10.0

func (*UndelegateResourceContract) Reset added in v0.10.0

func (x *UndelegateResourceContract) Reset()

func (*UndelegateResourceContract) String added in v0.10.0

func (x *UndelegateResourceContract) String() string

type UnfreezeAssetContract added in v0.12.0

type UnfreezeAssetContract struct {
	OwnerAddress string `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` // base58check (T...)
	// contains filtered or unexported fields
}

Unfreeze TRC-10 (legacy asset) balance.

func (*UnfreezeAssetContract) Descriptor deprecated added in v0.12.0

func (*UnfreezeAssetContract) Descriptor() ([]byte, []int)

Deprecated: Use UnfreezeAssetContract.ProtoReflect.Descriptor instead.

func (*UnfreezeAssetContract) GetOwnerAddress added in v0.12.0

func (x *UnfreezeAssetContract) GetOwnerAddress() string

func (*UnfreezeAssetContract) ProtoMessage added in v0.12.0

func (*UnfreezeAssetContract) ProtoMessage()

func (*UnfreezeAssetContract) ProtoReflect added in v0.12.0

func (x *UnfreezeAssetContract) ProtoReflect() protoreflect.Message

func (*UnfreezeAssetContract) Reset added in v0.12.0

func (x *UnfreezeAssetContract) Reset()

func (*UnfreezeAssetContract) String added in v0.12.0

func (x *UnfreezeAssetContract) String() string

type UnfreezeBalanceContract added in v0.12.0

type UnfreezeBalanceContract struct {
	OwnerAddress    string       `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`            // base58check (T...)
	Resource        ResourceCode `protobuf:"varint,2,opt,name=resource,proto3,enum=hdwallet.tron.proto.ResourceCode" json:"resource,omitempty"` // BANDWIDTH or ENERGY (default BANDWIDTH)
	ReceiverAddress string       `protobuf:"bytes,3,opt,name=receiver_address,json=receiverAddress,proto3" json:"receiver_address,omitempty"`   // optional delegate target; "" = self
	// contains filtered or unexported fields
}

Legacy Stake 1.0: unfreeze previously frozen TRX.

func (*UnfreezeBalanceContract) Descriptor deprecated added in v0.12.0

func (*UnfreezeBalanceContract) Descriptor() ([]byte, []int)

Deprecated: Use UnfreezeBalanceContract.ProtoReflect.Descriptor instead.

func (*UnfreezeBalanceContract) GetOwnerAddress added in v0.12.0

func (x *UnfreezeBalanceContract) GetOwnerAddress() string

func (*UnfreezeBalanceContract) GetReceiverAddress added in v0.12.0

func (x *UnfreezeBalanceContract) GetReceiverAddress() string

func (*UnfreezeBalanceContract) GetResource added in v0.12.0

func (x *UnfreezeBalanceContract) GetResource() ResourceCode

func (*UnfreezeBalanceContract) ProtoMessage added in v0.12.0

func (*UnfreezeBalanceContract) ProtoMessage()

func (*UnfreezeBalanceContract) ProtoReflect added in v0.12.0

func (x *UnfreezeBalanceContract) ProtoReflect() protoreflect.Message

func (*UnfreezeBalanceContract) Reset added in v0.12.0

func (x *UnfreezeBalanceContract) Reset()

func (*UnfreezeBalanceContract) String added in v0.12.0

func (x *UnfreezeBalanceContract) String() string

type UnfreezeBalanceV2Contract added in v0.10.0

type UnfreezeBalanceV2Contract struct {
	OwnerAddress    string       `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"`           // base58check (T...)
	UnfreezeBalance int64        `protobuf:"varint,2,opt,name=unfreeze_balance,json=unfreezeBalance,proto3" json:"unfreeze_balance,omitempty"` // SUN
	Resource        ResourceCode `protobuf:"varint,3,opt,name=resource,proto3,enum=hdwallet.tron.proto.ResourceCode" json:"resource,omitempty"`
	// contains filtered or unexported fields
}

Stake 2.0: unfreeze previously frozen TRX.

func (*UnfreezeBalanceV2Contract) Descriptor deprecated added in v0.10.0

func (*UnfreezeBalanceV2Contract) Descriptor() ([]byte, []int)

Deprecated: Use UnfreezeBalanceV2Contract.ProtoReflect.Descriptor instead.

func (*UnfreezeBalanceV2Contract) GetOwnerAddress added in v0.10.0

func (x *UnfreezeBalanceV2Contract) GetOwnerAddress() string

func (*UnfreezeBalanceV2Contract) GetResource added in v0.10.0

func (x *UnfreezeBalanceV2Contract) GetResource() ResourceCode

func (*UnfreezeBalanceV2Contract) GetUnfreezeBalance added in v0.10.0

func (x *UnfreezeBalanceV2Contract) GetUnfreezeBalance() int64

func (*UnfreezeBalanceV2Contract) ProtoMessage added in v0.10.0

func (*UnfreezeBalanceV2Contract) ProtoMessage()

func (*UnfreezeBalanceV2Contract) ProtoReflect added in v0.10.0

func (*UnfreezeBalanceV2Contract) Reset added in v0.10.0

func (x *UnfreezeBalanceV2Contract) Reset()

func (*UnfreezeBalanceV2Contract) String added in v0.10.0

func (x *UnfreezeBalanceV2Contract) String() string

type Vote added in v0.10.0

type Vote struct {
	VoteAddress string `protobuf:"bytes,1,opt,name=vote_address,json=voteAddress,proto3" json:"vote_address,omitempty"` // base58check (T...) of the Super Representative
	VoteCount   int64  `protobuf:"varint,2,opt,name=vote_count,json=voteCount,proto3" json:"vote_count,omitempty"`
	// contains filtered or unexported fields
}

One vote in a VoteWitnessContract.

func (*Vote) Descriptor deprecated added in v0.10.0

func (*Vote) Descriptor() ([]byte, []int)

Deprecated: Use Vote.ProtoReflect.Descriptor instead.

func (*Vote) GetVoteAddress added in v0.10.0

func (x *Vote) GetVoteAddress() string

func (*Vote) GetVoteCount added in v0.10.0

func (x *Vote) GetVoteCount() int64

func (*Vote) ProtoMessage added in v0.10.0

func (*Vote) ProtoMessage()

func (*Vote) ProtoReflect added in v0.10.0

func (x *Vote) ProtoReflect() protoreflect.Message

func (*Vote) Reset added in v0.10.0

func (x *Vote) Reset()

func (*Vote) String added in v0.10.0

func (x *Vote) String() string

type VoteAssetContract added in v0.12.0

type VoteAssetContract struct {
	OwnerAddress string   `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` // base58check (T...) or hex
	VoteAddress  []string `protobuf:"bytes,2,rep,name=vote_address,json=voteAddress,proto3" json:"vote_address,omitempty"`    // T... or hex
	Support      bool     `protobuf:"varint,3,opt,name=support,proto3" json:"support,omitempty"`
	Count        int32    `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

TRC-10 asset voting (VoteAssetContract).

func (*VoteAssetContract) Descriptor deprecated added in v0.12.0

func (*VoteAssetContract) Descriptor() ([]byte, []int)

Deprecated: Use VoteAssetContract.ProtoReflect.Descriptor instead.

func (*VoteAssetContract) GetCount added in v0.12.0

func (x *VoteAssetContract) GetCount() int32

func (*VoteAssetContract) GetOwnerAddress added in v0.12.0

func (x *VoteAssetContract) GetOwnerAddress() string

func (*VoteAssetContract) GetSupport added in v0.12.0

func (x *VoteAssetContract) GetSupport() bool

func (*VoteAssetContract) GetVoteAddress added in v0.12.0

func (x *VoteAssetContract) GetVoteAddress() []string

func (*VoteAssetContract) ProtoMessage added in v0.12.0

func (*VoteAssetContract) ProtoMessage()

func (*VoteAssetContract) ProtoReflect added in v0.12.0

func (x *VoteAssetContract) ProtoReflect() protoreflect.Message

func (*VoteAssetContract) Reset added in v0.12.0

func (x *VoteAssetContract) Reset()

func (*VoteAssetContract) String added in v0.12.0

func (x *VoteAssetContract) String() string

type VoteWitnessContract added in v0.10.0

type VoteWitnessContract struct {
	OwnerAddress string  `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` // base58check (T...)
	Votes        []*Vote `protobuf:"bytes,2,rep,name=votes,proto3" json:"votes,omitempty"`
	// contains filtered or unexported fields
}

Vote for Super Representatives.

func (*VoteWitnessContract) Descriptor deprecated added in v0.10.0

func (*VoteWitnessContract) Descriptor() ([]byte, []int)

Deprecated: Use VoteWitnessContract.ProtoReflect.Descriptor instead.

func (*VoteWitnessContract) GetOwnerAddress added in v0.10.0

func (x *VoteWitnessContract) GetOwnerAddress() string

func (*VoteWitnessContract) GetVotes added in v0.10.0

func (x *VoteWitnessContract) GetVotes() []*Vote

func (*VoteWitnessContract) ProtoMessage added in v0.10.0

func (*VoteWitnessContract) ProtoMessage()

func (*VoteWitnessContract) ProtoReflect added in v0.10.0

func (x *VoteWitnessContract) ProtoReflect() protoreflect.Message

func (*VoteWitnessContract) Reset added in v0.10.0

func (x *VoteWitnessContract) Reset()

func (*VoteWitnessContract) String added in v0.10.0

func (x *VoteWitnessContract) String() string

type WithdrawBalanceContract added in v0.12.0

type WithdrawBalanceContract struct {
	OwnerAddress string `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` // base58check (T...)
	// contains filtered or unexported fields
}

Claim SR / voting rewards (WithdrawBalanceContract).

func (*WithdrawBalanceContract) Descriptor deprecated added in v0.12.0

func (*WithdrawBalanceContract) Descriptor() ([]byte, []int)

Deprecated: Use WithdrawBalanceContract.ProtoReflect.Descriptor instead.

func (*WithdrawBalanceContract) GetOwnerAddress added in v0.12.0

func (x *WithdrawBalanceContract) GetOwnerAddress() string

func (*WithdrawBalanceContract) ProtoMessage added in v0.12.0

func (*WithdrawBalanceContract) ProtoMessage()

func (*WithdrawBalanceContract) ProtoReflect added in v0.12.0

func (x *WithdrawBalanceContract) ProtoReflect() protoreflect.Message

func (*WithdrawBalanceContract) Reset added in v0.12.0

func (x *WithdrawBalanceContract) Reset()

func (*WithdrawBalanceContract) String added in v0.12.0

func (x *WithdrawBalanceContract) String() string

type WithdrawExpireUnfreezeContract added in v0.10.0

type WithdrawExpireUnfreezeContract struct {
	OwnerAddress string `protobuf:"bytes,1,opt,name=owner_address,json=ownerAddress,proto3" json:"owner_address,omitempty"` // base58check (T...)
	// contains filtered or unexported fields
}

Stake 2.0: withdraw unfrozen TRX after the 14-day unbonding period.

func (*WithdrawExpireUnfreezeContract) Descriptor deprecated added in v0.10.0

func (*WithdrawExpireUnfreezeContract) Descriptor() ([]byte, []int)

Deprecated: Use WithdrawExpireUnfreezeContract.ProtoReflect.Descriptor instead.

func (*WithdrawExpireUnfreezeContract) GetOwnerAddress added in v0.10.0

func (x *WithdrawExpireUnfreezeContract) GetOwnerAddress() string

func (*WithdrawExpireUnfreezeContract) ProtoMessage added in v0.10.0

func (*WithdrawExpireUnfreezeContract) ProtoMessage()

func (*WithdrawExpireUnfreezeContract) ProtoReflect added in v0.10.0

func (*WithdrawExpireUnfreezeContract) Reset added in v0.10.0

func (x *WithdrawExpireUnfreezeContract) Reset()

func (*WithdrawExpireUnfreezeContract) String added in v0.10.0

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL