Documentation ¶
Index ¶
- type BasicCheckError
- type ID
- type InvalidPayloadTypeError
- type Tx
- func FromBytes(bs []byte) (*Tx, error)
- func NewBondTx(lockTime uint32, sender, receiver crypto.Address, pubKey *bls.PublicKey, ...) *Tx
- func NewSortitionTx(lockTime uint32, addr crypto.Address, proof sortition.Proof) *Tx
- func NewSubsidyTx(lockTime uint32, receiver crypto.Address, amt amount.Amount, memo string) *Tx
- func NewTransferTx(lockTime uint32, sender, receiver crypto.Address, amt, fee amount.Amount, ...) *Tx
- func NewUnbondTx(lockTime uint32, val crypto.Address, memo string) *Tx
- func NewWithdrawTx(lockTime uint32, val, acc crypto.Address, amt, fee amount.Amount, memo string) *Tx
- func (tx *Tx) BasicCheck() error
- func (tx *Tx) Bytes() ([]byte, error)
- func (tx *Tx) Decode(r io.Reader) error
- func (tx *Tx) Encode(w io.Writer) error
- func (tx *Tx) Fee() amount.Amount
- func (tx *Tx) ID() ID
- func (tx *Tx) IsBondTx() bool
- func (tx *Tx) IsFreeTx() bool
- func (tx *Tx) IsPublicKeyStriped() bool
- func (tx *Tx) IsSigned() bool
- func (tx *Tx) IsSortitionTx() bool
- func (tx *Tx) IsSubsidyTx() bool
- func (tx *Tx) IsTransferTx() bool
- func (tx *Tx) IsUnbondTx() bool
- func (tx *Tx) IsWithdrawTx() bool
- func (tx *Tx) LockTime() uint32
- func (tx *Tx) MarshalCBOR() ([]byte, error)
- func (tx *Tx) Memo() string
- func (tx *Tx) Payload() payload.Payload
- func (tx *Tx) PublicKey() crypto.PublicKey
- func (tx *Tx) SerializeSize() int
- func (tx *Tx) SetPublicKey(pub crypto.PublicKey)
- func (tx *Tx) SetSignature(sig crypto.Signature)
- func (tx *Tx) SignBytes() []byte
- func (tx *Tx) Signature() crypto.Signature
- func (tx *Tx) String() string
- func (tx *Tx) StripPublicKey()
- func (tx *Tx) UnmarshalCBOR(bs []byte) error
- func (tx *Tx) Version() uint8
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BasicCheckError ¶ added in v0.15.0
type BasicCheckError struct {
Reason string
}
BasicCheckError is returned when the basic check on the transaction fails.
func (BasicCheckError) Error ¶ added in v0.15.0
func (e BasicCheckError) Error() string
type InvalidPayloadTypeError ¶ added in v0.15.0
InvalidPayloadTypeError is returned when the payload type is not valid.
func (InvalidPayloadTypeError) Error ¶ added in v0.15.0
func (e InvalidPayloadTypeError) Error() string
type Tx ¶
type Tx struct {
// contains filtered or unexported fields
}
func NewSortitionTx ¶
func NewSubsidyTx ¶
func NewTransferTx ¶ added in v0.11.0
func NewWithdrawTx ¶
func (*Tx) BasicCheck ¶ added in v0.15.0
func (*Tx) IsPublicKeyStriped ¶ added in v0.15.0
IsPublicKeyStriped returns true if the public key stripped from the transaction.
func (*Tx) IsSigned ¶ added in v1.0.0
IsSigned returns true if the transaction has been signed and includes the signature.
func (*Tx) IsSortitionTx ¶
func (*Tx) IsSubsidyTx ¶
func (*Tx) IsTransferTx ¶ added in v0.13.0
func (*Tx) IsUnbondTx ¶
func (*Tx) IsWithdrawTx ¶
func (*Tx) MarshalCBOR ¶
func (*Tx) SerializeSize ¶
SerializeSize returns the number of bytes it would take to serialize the transaction.
func (*Tx) SetPublicKey ¶
func (*Tx) SetSignature ¶
func (*Tx) StripPublicKey ¶ added in v0.15.0
func (tx *Tx) StripPublicKey()
StripPublicKey removes the public key from the transaction. It is an alias function for `SetPublicKey(nil)`.
func (*Tx) UnmarshalCBOR ¶
Click to show internal directories.
Click to hide internal directories.