Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TransactionInput ¶
type TransactionInput struct { // The previous output transaction reference, as an OutPoint structure PreviousOutput TransactionInputOutpoint `json:"previous_output"` // Transaction version as defined by the sender. Intended for "replacement" of transactions when information is // updated before inclusion into a block. Sequence uint32 `json:"sequence"` Script []byte `json:"signature_script"` // Computational Script for confirming transaction authorization PublicKey []byte `json:"public_key,omitempty"` // Public Key for verify signature when to work with wallet WalletAddress []byte `json:"wallet_address,omitempty"` }
func (*TransactionInput) MarshalJSON ¶
func (ti *TransactionInput) MarshalJSON() ([]byte, error)
func (*TransactionInput) UnmarshalJSON ¶
func (ti *TransactionInput) UnmarshalJSON(data []byte) error
UnmarshalJSON custom json convert
type TransactionInputOutpoint ¶
type TransactionInputOutpoint struct { Hash [32]byte `json:"hash"` // The hash of the referenced transaction Index uint32 `json:"index"` // The index of the specific output in the transaction. The first output is 0, etc. Value uint64 `json:"value"` // Transaction Value Address string }
func (*TransactionInputOutpoint) MarshalJSON ¶
func (tio *TransactionInputOutpoint) MarshalJSON() ([]byte, error)
MarshalJSON custom json convert
func (TransactionInputOutpoint) ToBytes ¶
func (tio TransactionInputOutpoint) ToBytes() []byte
ToBytes convert TransactionInputOutpoint to bytes slice
func (*TransactionInputOutpoint) UnmarshalJSON ¶
func (tio *TransactionInputOutpoint) UnmarshalJSON(data []byte) error
UnmarshalJSON custom json convert
type TransactionOutput ¶
type TransactionOutput struct { Index uint32 `json:"index"` Value uint64 `json:"value"` // Transaction Value Script []byte `json:"pk_script"` // Usually contains the public key as a script setting up conditions to claim this output. Payload []byte `json:"payload"` WalletAddress []byte `json:"wallet_address,omitempty"` NodeID NodeID `json:"node_id"` // usually contains the public key of node for request to be part of commission }
func (*TransactionOutput) MarshalJSON ¶
func (to *TransactionOutput) MarshalJSON() ([]byte, error)
MarshalJSON custom json convert
func (*TransactionOutput) UnmarshalJSON ¶
func (to *TransactionOutput) UnmarshalJSON(data []byte) error
UnmarshalJSON custom json convert
type Tx ¶
type Tx struct { Hash [32]byte `json:"hash"` Version uint32 `json:"version"` LockTime uint32 `json:"lock_time"` Inputs []TransactionInput `json:"tx_in"` Outputs []TransactionOutput `json:"tx_out"` }
func NewTransaction ¶
func (*Tx) MarshalJSON ¶
func (*Tx) MsgForSign ¶
MsgForSign return msg for sign
func (*Tx) UnmarshalJSON ¶
UnmarshalJSON custom json convert
Click to show internal directories.
Click to hide internal directories.