tron

package
v0.7.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

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 SigningInput

type SigningInput struct {
	Transaction *Transaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"`
	// 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) 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
	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) GetExpiration

func (x *Transaction) GetExpiration() int64

func (*Transaction) GetFeeLimit

func (x *Transaction) GetFeeLimit() int64

func (*Transaction) GetTimestamp

func (x *Transaction) GetTimestamp() int64

func (*Transaction) GetTransfer

func (x *Transaction) GetTransfer() *TransferContract

func (*Transaction) GetTransferTrc20 added in v0.3.0

func (x *Transaction) GetTransferTrc20() *TransferTRC20Contract

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_Transfer

type Transaction_Transfer struct {
	Transfer *TransferContract `protobuf:"bytes,5,opt,name=transfer,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 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

Jump to

Keyboard shortcuts

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