Documentation ¶
Index ¶
- Variables
- func TrimSliceHandler(in []data.TransactionHandler) []data.TransactionHandler
- type ApiTransactionResult
- type Encoder
- type Event
- func (*Event) Descriptor() ([]byte, []int)
- func (this *Event) Equal(that interface{}) bool
- func (m *Event) GetAddress() []byte
- func (m *Event) GetData() []byte
- func (m *Event) GetIdentifier() []byte
- func (m *Event) GetTopics() [][]byte
- func (this *Event) GoString() string
- func (e *Event) IsInterfaceNil() bool
- func (m *Event) Marshal() (dAtA []byte, err error)
- func (m *Event) MarshalTo(dAtA []byte) (int, error)
- func (m *Event) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Event) ProtoMessage()
- func (m *Event) Reset()
- func (m *Event) Size() (n int)
- func (this *Event) String() string
- func (m *Event) Unmarshal(dAtA []byte) error
- func (m *Event) XXX_DiscardUnknown()
- func (m *Event) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Event) XXX_Merge(src proto.Message)
- func (m *Event) XXX_Size() int
- func (m *Event) XXX_Unmarshal(b []byte) error
- type FrontendTransaction
- type Log
- func (*Log) Descriptor() ([]byte, []int)
- func (this *Log) Equal(that interface{}) bool
- func (m *Log) GetAddress() []byte
- func (m *Log) GetEvents() []*Event
- func (l *Log) GetLogEvents() []data.EventHandler
- func (this *Log) GoString() string
- func (l *Log) IsInterfaceNil() bool
- func (m *Log) Marshal() (dAtA []byte, err error)
- func (m *Log) MarshalTo(dAtA []byte) (int, error)
- func (m *Log) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Log) ProtoMessage()
- func (m *Log) Reset()
- func (m *Log) Size() (n int)
- func (this *Log) String() string
- func (m *Log) Unmarshal(dAtA []byte) error
- func (m *Log) XXX_DiscardUnknown()
- func (m *Log) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Log) XXX_Merge(src proto.Message)
- func (m *Log) XXX_Size() int
- func (m *Log) XXX_Unmarshal(b []byte) error
- type Marshalizer
- type Transaction
- func (*Transaction) Descriptor() ([]byte, []int)
- func (this *Transaction) Equal(that interface{}) bool
- func (m *Transaction) GetChainID() []byte
- func (m *Transaction) GetData() []byte
- func (tx *Transaction) GetDataForSigning(encoder Encoder, marshalizer Marshalizer) ([]byte, error)
- func (m *Transaction) GetGasLimit() uint64
- func (m *Transaction) GetGasPrice() uint64
- func (m *Transaction) GetNonce() uint64
- func (m *Transaction) GetRcvAddr() []byte
- func (m *Transaction) GetRcvUserName() []byte
- func (m *Transaction) GetSignature() []byte
- func (m *Transaction) GetSndAddr() []byte
- func (m *Transaction) GetSndUserName() []byte
- func (m *Transaction) GetValue() *math_big.Int
- func (m *Transaction) GetVersion() uint32
- func (this *Transaction) GoString() string
- func (tx *Transaction) IsInterfaceNil() bool
- func (m *Transaction) Marshal() (dAtA []byte, err error)
- func (m *Transaction) MarshalTo(dAtA []byte) (int, error)
- func (m *Transaction) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*Transaction) ProtoMessage()
- func (m *Transaction) Reset()
- func (tx *Transaction) SetData(data []byte)
- func (tx *Transaction) SetRcvAddr(addr []byte)
- func (tx *Transaction) SetSndAddr(addr []byte)
- func (tx *Transaction) SetValue(value *big.Int)
- func (m *Transaction) Size() (n int)
- func (this *Transaction) String() string
- func (m *Transaction) Unmarshal(dAtA []byte) error
- func (m *Transaction) XXX_DiscardUnknown()
- func (m *Transaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Transaction) XXX_Merge(src proto.Message)
- func (m *Transaction) XXX_Size() int
- func (m *Transaction) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthLog = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowLog = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupLog = fmt.Errorf("proto: unexpected end of group") )
var ( ErrInvalidLengthTransaction = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTransaction = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTransaction = fmt.Errorf("proto: unexpected end of group") )
var ErrNilEncoder = errors.New("nil encoder")
ErrNilEncoder signals that a nil encoder has been provided
var ErrNilMarshalizer = errors.New("nil marshalizer")
ErrNilMarshalizer signals that a nil marshalizer has been provided
Functions ¶
func TrimSliceHandler ¶
func TrimSliceHandler(in []data.TransactionHandler) []data.TransactionHandler
TrimSliceHandler creates a copy of the provided slice without the excess capacity
Types ¶
type ApiTransactionResult ¶
type ApiTransactionResult struct { Type string `json:"type"` Hash string `json:"hash,omitempty"` Nonce uint64 `json:"nonce,omitempty"` Round uint64 `json:"round,omitempty"` Epoch uint32 `json:"epoch,omitempty"` Value string `json:"value,omitempty"` Receiver string `json:"receiver,omitempty"` Sender string `json:"sender,omitempty"` GasPrice uint64 `json:"gasPrice,omitempty"` GasLimit uint64 `json:"gasLimit,omitempty"` Data []byte `json:"data,omitempty"` Code string `json:"code,omitempty"` Signature string `json:"signature,omitempty"` SndShard uint32 `json:"sndShardID,omitempty"` RcvShard uint32 `json:"rcvShardID,omitempty"` BlockNonce uint64 `json:"blockNonce,omitempty"` MBHash string `json:"miniblockHash,omitempty"` BlockHash string `json:"blockHash,omitempty"` Status core.TransactionStatus `json:"status,omitempty"` }
ApiTransactionResult is the data transfer object which will be returned on the get transaction by hash endpoint
type Event ¶
type Event struct { Address []byte `protobuf:"bytes,1,opt,name=Address,proto3" json:"address"` Identifier []byte `protobuf:"bytes,2,opt,name=Identifier,proto3" json:"identifier"` Topics [][]byte `protobuf:"bytes,3,rep,name=Topics,proto3" json:"topics"` Data []byte `protobuf:"bytes,4,opt,name=Data,proto3" json:"data"` }
Event holds all the data needed for an event structure
func (*Event) Descriptor ¶
func (*Event) GetAddress ¶
func (*Event) GetIdentifier ¶
func (*Event) IsInterfaceNil ¶
IsInterfaceNil verifies if underlying object is nil
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) XXX_DiscardUnknown ¶
func (m *Event) XXX_DiscardUnknown()
func (*Event) XXX_Marshal ¶
func (*Event) XXX_Unmarshal ¶
type FrontendTransaction ¶ added in v0.0.2
type FrontendTransaction struct { Nonce uint64 `json:"nonce"` Value string `json:"value"` Receiver string `json:"receiver"` Sender string `json:"sender"` SenderUsername []byte `json:"senderUsername,omitempty"` ReceiverUsername []byte `json:"receiverUsername,omitempty"` GasPrice uint64 `json:"gasPrice"` GasLimit uint64 `json:"gasLimit"` Data []byte `json:"data,omitempty"` Signature string `json:"signature,omitempty"` ChainID string `json:"chainID"` Version uint32 `json:"version"` }
FrontendTransaction represents the DTO used in transaction signing/validation.
type Log ¶
type Log struct { Address []byte `protobuf:"bytes,1,opt,name=Address,proto3" json:"address"` Events []*Event `protobuf:"bytes,2,rep,name=Events,proto3" json:"events"` }
Log holds all the data needed for a log structure
func (*Log) Descriptor ¶
func (*Log) GetAddress ¶
func (*Log) GetLogEvents ¶
func (l *Log) GetLogEvents() []data.EventHandler
GetLogEvents returns the interface for the underlying events of the log structure
func (*Log) IsInterfaceNil ¶
IsInterfaceNil verifies if underlying object is nil
func (*Log) ProtoMessage ¶
func (*Log) ProtoMessage()
func (*Log) XXX_DiscardUnknown ¶
func (m *Log) XXX_DiscardUnknown()
func (*Log) XXX_Unmarshal ¶
type Marshalizer ¶
Marshalizer is able to encode an object to its byte slice representation
type Transaction ¶
type Transaction struct { Nonce uint64 `protobuf:"varint,1,opt,name=Nonce,proto3" json:"nonce"` Value *math_big.Int `` /* 134-byte string literal not displayed */ RcvAddr []byte `protobuf:"bytes,3,opt,name=RcvAddr,proto3" json:"receiver"` RcvUserName []byte `protobuf:"bytes,4,opt,name=RcvUserName,proto3" json:"rcvUserName,omitempty"` SndAddr []byte `protobuf:"bytes,5,opt,name=SndAddr,proto3" json:"sender"` SndUserName []byte `protobuf:"bytes,6,opt,name=SndUserName,proto3" json:"sndUserName,omitempty"` GasPrice uint64 `protobuf:"varint,7,opt,name=GasPrice,proto3" json:"gasPrice,omitempty"` GasLimit uint64 `protobuf:"varint,8,opt,name=GasLimit,proto3" json:"gasLimit,omitempty"` Data []byte `protobuf:"bytes,9,opt,name=Data,proto3" json:"data,omitempty"` ChainID []byte `protobuf:"bytes,10,opt,name=ChainID,proto3" json:"chainID"` Version uint32 `protobuf:"varint,11,opt,name=Version,proto3" json:"version"` Signature []byte `protobuf:"bytes,12,opt,name=Signature,proto3" json:"signature,omitempty"` }
Transaction holds all the data needed for a value transfer or SC call
func TrimSlicePtr ¶
func TrimSlicePtr(in []*Transaction) []*Transaction
TrimSlicePtr creates a copy of the provided slice without the excess capacity
func (*Transaction) Descriptor ¶
func (*Transaction) Descriptor() ([]byte, []int)
func (*Transaction) Equal ¶
func (this *Transaction) Equal(that interface{}) bool
func (*Transaction) GetChainID ¶
func (m *Transaction) GetChainID() []byte
func (*Transaction) GetData ¶
func (m *Transaction) GetData() []byte
func (*Transaction) GetDataForSigning ¶
func (tx *Transaction) GetDataForSigning(encoder Encoder, marshalizer Marshalizer) ([]byte, error)
GetDataForSigning returns the serialized transaction having an empty signature field
func (*Transaction) GetGasLimit ¶
func (m *Transaction) GetGasLimit() uint64
func (*Transaction) GetGasPrice ¶
func (m *Transaction) GetGasPrice() uint64
func (*Transaction) GetNonce ¶
func (m *Transaction) GetNonce() uint64
func (*Transaction) GetRcvAddr ¶
func (m *Transaction) GetRcvAddr() []byte
func (*Transaction) GetRcvUserName ¶
func (m *Transaction) GetRcvUserName() []byte
func (*Transaction) GetSignature ¶
func (m *Transaction) GetSignature() []byte
func (*Transaction) GetSndAddr ¶
func (m *Transaction) GetSndAddr() []byte
func (*Transaction) GetSndUserName ¶
func (m *Transaction) GetSndUserName() []byte
func (*Transaction) GetValue ¶
func (m *Transaction) GetValue() *math_big.Int
func (*Transaction) GetVersion ¶
func (m *Transaction) GetVersion() uint32
func (*Transaction) GoString ¶
func (this *Transaction) GoString() string
func (*Transaction) IsInterfaceNil ¶
func (tx *Transaction) IsInterfaceNil() bool
IsInterfaceNil verifies if underlying object is nil
func (*Transaction) Marshal ¶
func (m *Transaction) Marshal() (dAtA []byte, err error)
func (*Transaction) MarshalToSizedBuffer ¶
func (m *Transaction) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*Transaction) ProtoMessage ¶
func (*Transaction) ProtoMessage()
func (*Transaction) Reset ¶
func (m *Transaction) Reset()
func (*Transaction) SetData ¶
func (tx *Transaction) SetData(data []byte)
SetData sets the data of the transaction
func (*Transaction) SetRcvAddr ¶
func (tx *Transaction) SetRcvAddr(addr []byte)
SetRcvAddr sets the receiver address of the transaction
func (*Transaction) SetSndAddr ¶
func (tx *Transaction) SetSndAddr(addr []byte)
SetSndAddr sets the sender address of the transaction
func (*Transaction) SetValue ¶
func (tx *Transaction) SetValue(value *big.Int)
SetValue sets the value of the transaction
func (*Transaction) Size ¶
func (m *Transaction) Size() (n int)
func (*Transaction) String ¶
func (this *Transaction) String() string
func (*Transaction) Unmarshal ¶
func (m *Transaction) Unmarshal(dAtA []byte) error
func (*Transaction) XXX_DiscardUnknown ¶
func (m *Transaction) XXX_DiscardUnknown()
func (*Transaction) XXX_Marshal ¶
func (m *Transaction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*Transaction) XXX_Merge ¶
func (m *Transaction) XXX_Merge(src proto.Message)
func (*Transaction) XXX_Size ¶
func (m *Transaction) XXX_Size() int
func (*Transaction) XXX_Unmarshal ¶
func (m *Transaction) XXX_Unmarshal(b []byte) error