hedera

package
v0.0.1-gowrapper-dev Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_Hedera_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type SigningInput

type SigningInput struct {

	// Private key to sign the transaction (bytes)
	PrivateKey []byte `protobuf:"bytes,1,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"`
	// The transaction body
	Body *TransactionBody `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
	// contains filtered or unexported fields
}

Input data necessary to create a signed transaction.

func (*SigningInput) Descriptor deprecated

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

Deprecated: Use SigningInput.ProtoReflect.Descriptor instead.

func (*SigningInput) GetBody

func (x *SigningInput) GetBody() *TransactionBody

func (*SigningInput) GetPrivateKey

func (x *SigningInput) GetPrivateKey() []byte

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 {

	// Signed and encoded transaction bytes.
	Encoded []byte `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"`
	// contains filtered or unexported fields
}

Transaction signing output.

func (*SigningOutput) Descriptor deprecated

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

Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead.

func (*SigningOutput) GetEncoded

func (x *SigningOutput) GetEncoded() []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 Timestamp

type Timestamp struct {

	// Number of complete seconds since the start of the epoch
	Seconds int64 `protobuf:"varint,1,opt,name=seconds,proto3" json:"seconds,omitempty"`
	// Number of nanoseconds since the start of the last second
	Nanos int32 `protobuf:"varint,2,opt,name=nanos,proto3" json:"nanos,omitempty"`
	// contains filtered or unexported fields
}

An exact date and time. This is the same data structure as the protobuf Timestamp.proto (see the comments in https://github.com/google/protobuf/blob/master/src/google/protobuf/timestamp.proto)

func (*Timestamp) Descriptor deprecated

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

Deprecated: Use Timestamp.ProtoReflect.Descriptor instead.

func (*Timestamp) GetNanos

func (x *Timestamp) GetNanos() int32

func (*Timestamp) GetSeconds

func (x *Timestamp) GetSeconds() int64

func (*Timestamp) ProtoMessage

func (*Timestamp) ProtoMessage()

func (*Timestamp) ProtoReflect

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

func (*Timestamp) Reset

func (x *Timestamp) Reset()

func (*Timestamp) String

func (x *Timestamp) String() string

type TransactionBody

type TransactionBody struct {

	// The ID for this transaction, which includes the payer's account (the account paying the transaction fee).
	// If two transactions have the same transactionID, they won't both have an effect
	TransactionID *TransactionID `protobuf:"bytes,1,opt,name=transactionID,proto3" json:"transactionID,omitempty"`
	// The account of the node that submits the client's transaction to the network
	NodeAccountID string `protobuf:"bytes,2,opt,name=nodeAccountID,proto3" json:"nodeAccountID,omitempty"`
	// The maximum transaction fee the client is willing to pay
	TransactionFee uint64 `protobuf:"varint,3,opt,name=transactionFee,proto3" json:"transactionFee,omitempty"`
	// The transaction is invalid if consensusTimestamp > transactionID.transactionValidStart + transactionValidDuration
	TransactionValidDuration int64 `protobuf:"varint,4,opt,name=transactionValidDuration,proto3" json:"transactionValidDuration,omitempty"`
	// Any notes or descriptions that should be put into the record (max length 100)
	Memo string `protobuf:"bytes,5,opt,name=memo,proto3" json:"memo,omitempty"`
	// The choices here are arranged by service in roughly lexicographical order. The field ordinals are non-sequential,
	// and a result of the historical order of implementation.
	//
	// Types that are valid to be assigned to Data:
	//
	//	*TransactionBody_Transfer
	Data isTransactionBody_Data `protobuf_oneof:"data"`
	// contains filtered or unexported fields
}

A single transaction. All transaction types are possible here.

func (*TransactionBody) Descriptor deprecated

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

Deprecated: Use TransactionBody.ProtoReflect.Descriptor instead.

func (*TransactionBody) GetData

func (x *TransactionBody) GetData() isTransactionBody_Data

func (*TransactionBody) GetMemo

func (x *TransactionBody) GetMemo() string

func (*TransactionBody) GetNodeAccountID

func (x *TransactionBody) GetNodeAccountID() string

func (*TransactionBody) GetTransactionFee

func (x *TransactionBody) GetTransactionFee() uint64

func (*TransactionBody) GetTransactionID

func (x *TransactionBody) GetTransactionID() *TransactionID

func (*TransactionBody) GetTransactionValidDuration

func (x *TransactionBody) GetTransactionValidDuration() int64

func (*TransactionBody) GetTransfer

func (x *TransactionBody) GetTransfer() *TransferMessage

func (*TransactionBody) ProtoMessage

func (*TransactionBody) ProtoMessage()

func (*TransactionBody) ProtoReflect

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

func (*TransactionBody) Reset

func (x *TransactionBody) Reset()

func (*TransactionBody) String

func (x *TransactionBody) String() string

type TransactionBody_Transfer

type TransactionBody_Transfer struct {
	// Transfer amount between accounts
	Transfer *TransferMessage `protobuf:"bytes,6,opt,name=transfer,proto3,oneof"`
}

type TransactionID

type TransactionID struct {

	// The transaction is invalid if consensusTimestamp < transactionID.transactionStartValid
	TransactionValidStart *Timestamp `protobuf:"bytes,1,opt,name=transactionValidStart,proto3" json:"transactionValidStart,omitempty"`
	// The Account ID that paid for this transaction
	AccountID string `protobuf:"bytes,2,opt,name=accountID,proto3" json:"accountID,omitempty"`
	// Whether the Transaction is of type Scheduled or no
	Scheduled bool `protobuf:"varint,3,opt,name=scheduled,proto3" json:"scheduled,omitempty"`
	// The identifier for an internal transaction that was spawned as part
	// of handling a user transaction. (These internal transactions share the
	// transactionValidStart and accountID of the user transaction, so a
	// nonce is necessary to give them a unique TransactionID.)
	//
	// An example is when a "parent" ContractCreate or ContractCall transaction
	// calls one or more HTS precompiled contracts; each of the "child" transactions spawned for a precompile has a id
	// with a different nonce.
	Nonce int32 `protobuf:"varint,4,opt,name=nonce,proto3" json:"nonce,omitempty"`
	// contains filtered or unexported fields
}

The ID for a transaction. This is used for retrieving receipts and records for a transaction, for appending to a file right after creating it, for instantiating a smart contract with bytecode in a file just created, and internally by the network for detecting when duplicate transactions are submitted. A user might get a transaction processed faster by submitting it to N nodes, each with a different node account, but all with the same TransactionID. Then, the transaction will take effect when the first of all those nodes submits the transaction and it reaches consensus. The other transactions will not take effect. So this could make the transaction take effect faster, if any given node might be slow. However, the full transaction fee is charged for each transaction, so the total fee is N times as much if the transaction is sent to N nodes.

Applicable to Scheduled Transactions:

  • The ID of a Scheduled Transaction has transactionValidStart and accountIDs inherited from the ScheduleCreate transaction that created it. That is to say that they are equal
  • The scheduled property is true for Scheduled Transactions
  • transactionValidStart, accountID and scheduled properties should be omitted

func (*TransactionID) Descriptor deprecated

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

Deprecated: Use TransactionID.ProtoReflect.Descriptor instead.

func (*TransactionID) GetAccountID

func (x *TransactionID) GetAccountID() string

func (*TransactionID) GetNonce

func (x *TransactionID) GetNonce() int32

func (*TransactionID) GetScheduled

func (x *TransactionID) GetScheduled() bool

func (*TransactionID) GetTransactionValidStart

func (x *TransactionID) GetTransactionValidStart() *Timestamp

func (*TransactionID) ProtoMessage

func (*TransactionID) ProtoMessage()

func (*TransactionID) ProtoReflect

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

func (*TransactionID) Reset

func (x *TransactionID) Reset()

func (*TransactionID) String

func (x *TransactionID) String() string

type TransferMessage

type TransferMessage struct {

	// Source Account address (string)
	From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
	// Destination Account address (string)
	To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"`
	// Amount to be transferred (sint64)
	Amount int64 `protobuf:"zigzag64,3,opt,name=amount,proto3" json:"amount,omitempty"`
	// contains filtered or unexported fields
}

Necessary fields to process a TransferMessage

func (*TransferMessage) Descriptor deprecated

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

Deprecated: Use TransferMessage.ProtoReflect.Descriptor instead.

func (*TransferMessage) GetAmount

func (x *TransferMessage) GetAmount() int64

func (*TransferMessage) GetFrom

func (x *TransferMessage) GetFrom() string

func (*TransferMessage) GetTo

func (x *TransferMessage) GetTo() string

func (*TransferMessage) ProtoMessage

func (*TransferMessage) ProtoMessage()

func (*TransferMessage) ProtoReflect

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

func (*TransferMessage) Reset

func (x *TransferMessage) Reset()

func (*TransferMessage) String

func (x *TransferMessage) String() string

Jump to

Keyboard shortcuts

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