txns

package
v0.0.32 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TxTypeCoinTransfer                types.TxCode = iota + 1 // For native coin transfer to/between accounts
	TxTypeValidatorTicket                                     // For validator ticket purchase
	TxTypeHostTicket                                          // For purchasing host ticket
	TxTypeSetDelegatorCommission                              // For setting delegator commission
	TxTypeUnbondHostTicket                                    // For unbonding host ticket
	TxTypeRepoCreate                                          // For creating a repository
	TxTypeRegisterPushKey                                     // For adding a push key
	TxTypePush                                                // For pushing updates to a repository
	TxTypeNamespaceRegister                                   // For namespace purchase
	TxTypeNamespaceDomainUpdate                               // For setting namespace domains
	TxTypeRepoProposalUpsertOwner                             // For creating a proposal to add repo owner
	TxTypeRepoProposalVote                                    // For voting on a repo proposal
	TxTypeRepoProposalUpdate                                  // For creating a repo update proposal
	TxTypeRepoProposalSendFee                                 // For native coin transfer to repo as proposal fee
	TxTypeRepoProposalRegisterPushKey                         // For adding push keys to a repo
	TxTypeUpDelPushKey                                        // For updating or deleting a push key
	TxTypeMergeRequestProposalAction                          // For identifying merge request proposal
)

All Transaction type

Variables

This section is empty.

Functions

func DecodeTx

func DecodeTx(txBz []byte) (types.BaseTx, error)

DecodeTx decodes msgpack data to transactions.

func DecodeTxFromMap

func DecodeTxFromMap(data map[string]interface{}) (types.BaseTx, error)

DecodeTxFromMap decodes a user-provided map to a transaction object.

func NewCoinTransferTx

func NewCoinTransferTx(
	nonce uint64,
	to identifier.Address,
	senderKey *ed25519.Key,
	value util.String,
	fee util.String,
	timestamp int64) (baseTx types.BaseTx)

NewCoinTransferTx creates and populates a coin transfer transaction

func NewTicketPurchaseTx

func NewTicketPurchaseTx(
	ticketType types.TxCode,
	nonce uint64,
	senderKey *ed25519.Key,
	value util.String,
	fee util.String,
	timestamp int64) (baseTx types.BaseTx)

NewCoinTransferTx creates and populates a ticket purchase transaction

func SignTransaction

func SignTransaction(tx types.BaseTx, privKey string) ([]byte, error)

SignTransaction signs a transaction. Expects private key in base58Check encoding.

Types

type PushEndorsements

type PushEndorsements []*pptyp.PushEndorsement

func (PushEndorsements) ClearNoteID

func (e PushEndorsements) ClearNoteID()

ClearNoteID clears the Note ID of all endorsements

func (PushEndorsements) ClearReferences

func (e PushEndorsements) ClearReferences(ignoreIndex int)

ClearReferences sets the endorsed references for all endorsements except ignoreIndex.

func (PushEndorsements) SetNoteID

func (e PushEndorsements) SetNoteID(id []byte)

SetNoteID sets the Note ID of all endorsements

func (PushEndorsements) SetReferences

func (e PushEndorsements) SetReferences(ef pptyp.EndorsedReferences)

SetReferences sets the endorsed references for all endorsements

type TxCoinTransfer

type TxCoinTransfer struct {
	*TxType      `json:",flatten" msgpack:"-" mapstructure:"-"`
	*TxCommon    `json:",flatten" msgpack:"-" mapstructure:"-"`
	*TxRecipient `json:",flatten" msgpack:"-" mapstructure:"-"`
	*TxValue     `json:",flatten" msgpack:"-" mapstructure:"-"`
}

TxCoinTransfer implements BaseTx, it describes a transaction that transfers the native coin from one account to another.

func NewBareTxCoinTransfer

func NewBareTxCoinTransfer() *TxCoinTransfer

NewBareTxCoinTransfer returns an instance of TxCoinTransfer with zero values

func (*TxCoinTransfer) Bytes

func (tx *TxCoinTransfer) Bytes() []byte

Bytes returns the serialized transaction

func (*TxCoinTransfer) ComputeHash

func (tx *TxCoinTransfer) ComputeHash() util.Bytes32

ComputeHash computes the hash of the transaction

func (*TxCoinTransfer) DecodeMsgpack

func (tx *TxCoinTransfer) DecodeMsgpack(dec *msgpack.Decoder) error

DecodeMsgpack implements msgpack.CustomDecoder

func (*TxCoinTransfer) EncodeMsgpack

func (tx *TxCoinTransfer) EncodeMsgpack(enc *msgpack.Encoder) error

EncodeMsgpack implements msgpack.CustomEncoder

func (*TxCoinTransfer) FromMap

func (tx *TxCoinTransfer) FromMap(data map[string]interface{}) error

FromMap populates tx with a map generated by tx.ToMap.

func (*TxCoinTransfer) GetBytesNoSig

func (tx *TxCoinTransfer) GetBytesNoSig() []byte

GetBytesNoSig returns the serialized the transaction excluding the signature

func (*TxCoinTransfer) GetEcoSize

func (tx *TxCoinTransfer) GetEcoSize() int64

GetEcoSize returns the size of the transaction for use in protocol economics

func (*TxCoinTransfer) GetHash

func (tx *TxCoinTransfer) GetHash() util.HexBytes

GetHash returns the hash of the transaction

func (*TxCoinTransfer) GetID

func (tx *TxCoinTransfer) GetID() string

GetID returns the id of the transaction (also the hash)

func (*TxCoinTransfer) GetSize

func (tx *TxCoinTransfer) GetSize() int64

GetSize returns the size of the tx object (excluding nothing)

func (*TxCoinTransfer) Sign

func (tx *TxCoinTransfer) Sign(privKey string) ([]byte, error)

Sign signs the transaction

func (*TxCoinTransfer) ToMap

func (tx *TxCoinTransfer) ToMap() map[string]interface{}

ToMap returns a map equivalent of the transaction

type TxCommon

type TxCommon struct {
	util.CodecUtil   `json:"-" msgpack:"-" mapstructure:"-"`
	*types.BasicMeta `json:"-" msgpack:"-" mapstructure:"-"`
	Nonce            uint64            `json:"nonce" msgpack:"nonce" mapstructure:"nonce"`
	Fee              util.String       `json:"fee" msgpack:"fee" mapstructure:"fee"`
	Sig              util.Bytes        `json:"sig" msgpack:"sig" mapstructure:"sig"`
	Timestamp        int64             `json:"timestamp" msgpack:"timestamp" mapstructure:"timestamp"`
	SenderPubKey     ed25519.PublicKey `json:"senderPubKey" msgpack:"senderPubKey" mapstructure:"senderPubKey"`
}

TxCommon implements some of BaseTx, it includes some common fields and methods

func NewBareTxCommon

func NewBareTxCommon() *TxCommon

NewBareTxCommon returns an instance of TxCommon with zero values

func (*TxCommon) DecodeMsgpack

func (tx *TxCommon) DecodeMsgpack(dec *msgpack2.Decoder) error

func (*TxCommon) EncodeMsgpack

func (tx *TxCommon) EncodeMsgpack(enc *msgpack.Encoder) error

func (*TxCommon) FromMap

func (tx *TxCommon) FromMap(data map[string]interface{}) (err error)

FromMap populates tx with a map generated by tx.ToMap.

func (*TxCommon) GetFee

func (tx *TxCommon) GetFee() util.String

GetFee returns the transaction nonce

func (*TxCommon) GetFrom

func (tx *TxCommon) GetFrom() identifier.Address

GetFrom returns the address of the transaction sender Panics if sender's public key is invalid

func (*TxCommon) GetNonce

func (tx *TxCommon) GetNonce() uint64

GetNonce returns the transaction nonce

func (*TxCommon) GetSenderPubKey

func (tx *TxCommon) GetSenderPubKey() ed25519.PublicKey

GetSenderPubKey returns the transaction sender public key

func (*TxCommon) GetSignature

func (tx *TxCommon) GetSignature() []byte

GetSignature returns the transaction signature

func (*TxCommon) GetTimestamp

func (tx *TxCommon) GetTimestamp() int64

GetTimestamp return the transaction creation unix timestamp

func (*TxCommon) SetFee

func (tx *TxCommon) SetFee(fee util.String)

SetFee returns the transaction nonce

func (*TxCommon) SetNonce

func (tx *TxCommon) SetNonce(n uint64)

SetNonce set the transaction nonce

func (*TxCommon) SetSenderPubKey

func (tx *TxCommon) SetSenderPubKey(pk []byte)

SetSenderPubKey set the transaction sender public key

func (*TxCommon) SetSignature

func (tx *TxCommon) SetSignature(s []byte)

SetSignature sets the transaction signature

func (*TxCommon) SetTimestamp

func (tx *TxCommon) SetTimestamp(t int64)

SetTimestamp set the transaction creation unix timestamp

type TxDescription added in v0.0.30

type TxDescription struct {
	Description string `json:"desc" msgpack:"desc" mapstructure:"desc"`
}

TxDescription describes a transaction

func (*TxDescription) FromMap added in v0.0.30

func (tx *TxDescription) FromMap(data map[string]interface{}) (err error)

FromMap populates tx with a map generated by tx.ToMap.

func (*TxDescription) SetDescription added in v0.0.30

func (tx *TxDescription) SetDescription(desc string)

type TxNamespaceDomainUpdate

type TxNamespaceDomainUpdate struct {
	*TxType   `json:",flatten" msgpack:"-" mapstructure:"-"`
	*TxCommon `json:",flatten" msgpack:"-" mapstructure:"-"`
	Name      string            `json:"name" msgpack:"name" mapstructure:"name"`
	Domains   map[string]string `json:"domains" msgpack:"domains" mapstructure:"domains"`
}

TxNamespaceDomainUpdate implements BaseTx, it describes a transaction for acquiring a namespace

func NewBareTxNamespaceDomainUpdate

func NewBareTxNamespaceDomainUpdate() *TxNamespaceDomainUpdate

NewBareTxNamespaceDomainUpdate returns an instance of TxNamespaceDomainUpdate with zero values

func (*TxNamespaceDomainUpdate) Bytes

func (tx *TxNamespaceDomainUpdate) Bytes() []byte

Bytes returns the serialized transaction

func (*TxNamespaceDomainUpdate) ComputeHash

func (tx *TxNamespaceDomainUpdate) ComputeHash() util.Bytes32

ComputeHash computes the hash of the transaction

func (*TxNamespaceDomainUpdate) DecodeMsgpack

func (tx *TxNamespaceDomainUpdate) DecodeMsgpack(dec *msgpack.Decoder) error

DecodeMsgpack implements msgpack.CustomDecoder

func (*TxNamespaceDomainUpdate) EncodeMsgpack

func (tx *TxNamespaceDomainUpdate) EncodeMsgpack(enc *msgpack.Encoder) error

EncodeMsgpack implements msgpack.CustomEncoder

func (*TxNamespaceDomainUpdate) FromMap

func (tx *TxNamespaceDomainUpdate) FromMap(data map[string]interface{}) error

FromMap populates tx with a map generated by tx.ToMap.

func (*TxNamespaceDomainUpdate) GetBytesNoSig

func (tx *TxNamespaceDomainUpdate) GetBytesNoSig() []byte

GetBytesNoSig returns the serialized the transaction excluding the signature

func (*TxNamespaceDomainUpdate) GetEcoSize

func (tx *TxNamespaceDomainUpdate) GetEcoSize() int64

GetEcoSize returns the size of the transaction for use in protocol economics

func (*TxNamespaceDomainUpdate) GetHash

func (tx *TxNamespaceDomainUpdate) GetHash() util.HexBytes

GetHash returns the hash of the transaction

func (*TxNamespaceDomainUpdate) GetID

func (tx *TxNamespaceDomainUpdate) GetID() string

GetID returns the id of the transaction (also the hash)

func (*TxNamespaceDomainUpdate) GetSize

func (tx *TxNamespaceDomainUpdate) GetSize() int64

GetSize returns the size of the tx object (excluding nothing)

func (*TxNamespaceDomainUpdate) Sign

func (tx *TxNamespaceDomainUpdate) Sign(privKey string) ([]byte, error)

Sign signs the transaction

func (*TxNamespaceDomainUpdate) ToMap

func (tx *TxNamespaceDomainUpdate) ToMap() map[string]interface{}

ToMap returns a map equivalent of the transaction

type TxNamespaceRegister

type TxNamespaceRegister struct {
	*TxType   `json:",flatten" msgpack:"-" mapstructure:"-"`
	*TxCommon `json:",flatten" msgpack:"-" mapstructure:"-"`
	*TxValue  `json:",flatten" msgpack:"-" mapstructure:"-"`
	Name      string            `json:"name" msgpack:"name" mapstructure:"name"`          // The name of the namespace
	To        string            `json:"to" msgpack:"to" mapstructure:"to"`                // Name of repo or address that will own the name.
	Domains   map[string]string `json:"domains" msgpack:"domains" mapstructure:"domains"` // Dictionary of namespace domains and their target
}

TxNamespaceRegister implements BaseTx, it describes a transaction for acquiring a namespace

func NewBareTxNamespaceRegister

func NewBareTxNamespaceRegister() *TxNamespaceRegister

NewBareTxNamespaceRegister returns an instance of TxNamespaceRegister with zero values

func (*TxNamespaceRegister) Bytes

func (tx *TxNamespaceRegister) Bytes() []byte

Bytes returns the serialized transaction

func (*TxNamespaceRegister) ComputeHash

func (tx *TxNamespaceRegister) ComputeHash() util.Bytes32

ComputeHash computes the hash of the transaction

func (*TxNamespaceRegister) DecodeMsgpack

func (tx *TxNamespaceRegister) DecodeMsgpack(dec *msgpack.Decoder) error

DecodeMsgpack implements msgpack.CustomDecoder

func (*TxNamespaceRegister) EncodeMsgpack

func (tx *TxNamespaceRegister) EncodeMsgpack(enc *msgpack.Encoder) error

EncodeMsgpack implements msgpack.CustomEncoder

func (*TxNamespaceRegister) FromMap

func (tx *TxNamespaceRegister) FromMap(data map[string]interface{}) error

FromMap populates tx with a map generated by tx.ToMap.

func (*TxNamespaceRegister) GetBytesNoSig

func (tx *TxNamespaceRegister) GetBytesNoSig() []byte

GetBytesNoSig returns the serialized the transaction excluding the signature

func (*TxNamespaceRegister) GetEcoSize

func (tx *TxNamespaceRegister) GetEcoSize() int64

GetEcoSize returns the size of the transaction for use in protocol economics

func (*TxNamespaceRegister) GetHash

func (tx *TxNamespaceRegister) GetHash() util.HexBytes

GetHash returns the hash of the transaction

func (*TxNamespaceRegister) GetID

func (tx *TxNamespaceRegister) GetID() string

GetID returns the id of the transaction (also the hash)

func (*TxNamespaceRegister) GetSize

func (tx *TxNamespaceRegister) GetSize() int64

GetSize returns the size of the tx object (excluding nothing)

func (*TxNamespaceRegister) Sign

func (tx *TxNamespaceRegister) Sign(privKey string) ([]byte, error)

Sign signs the transaction

func (*TxNamespaceRegister) ToMap

func (tx *TxNamespaceRegister) ToMap() map[string]interface{}

ToMap returns a map equivalent of the transaction

type TxProposalCommon

type TxProposalCommon struct {

	// RepoName is the target repository to create the proposal on.
	RepoName string `json:"name" msgpack:"name" mapstructure:"name"`

	// Value is the sometimes optional proposal fee
	Value util.String `json:"value" msgpack:"value" mapstructure:"value"`

	// ID is the proposal ID
	ID string `json:"id,omitempty" msgpack:"id" mapstructure:"id"`
}

TxProposalCommon describes fields for a proposal

func (*TxProposalCommon) FromMap

func (tx *TxProposalCommon) FromMap(data map[string]interface{}) (err error)

FromMap populates tx with a map generated by tx.ToMap.

func (*TxProposalCommon) GetProposalID

func (tx *TxProposalCommon) GetProposalID() string

GetProposalID returns the proposal ID

func (*TxProposalCommon) GetProposalRepoName

func (tx *TxProposalCommon) GetProposalRepoName() string

GetProposalRepoName returns the target repository name

func (*TxProposalCommon) GetProposalValue

func (tx *TxProposalCommon) GetProposalValue() util.String

GetProposalValue returns the proposal value

type TxPush

type TxPush struct {
	*TxCommon `json:",flatten" mapstructure:"-"`
	*TxType   `json:",flatten" msgpack:"-"`

	// Note is the push note
	Note pptyp.PushNote `json:"note" mapstructure:"note"`

	// Endorsements contain push endorsements
	Endorsements PushEndorsements `json:"endorsements" mapstructure:"endorsements"`

	// AggregatedSig contains aggregated BLS signature composed by endorsers
	AggregatedSig []byte `json:"aggEndSig" mapstructure:"aggEndSig"`
}

TxPush implements BaseTx, it describes a transaction that creates a repository for the signer

func NewBareTxPush

func NewBareTxPush() *TxPush

NewBareTxPush returns an instance of TxPush with zero values

func (*TxPush) Bytes

func (tx *TxPush) Bytes() []byte

Bytes returns the serialized transaction

func (*TxPush) ComputeHash

func (tx *TxPush) ComputeHash() util.Bytes32

ComputeHash computes the hash of the transaction

func (*TxPush) DecodeMsgpack

func (tx *TxPush) DecodeMsgpack(dec *msgpack.Decoder) error

DecodeMsgpack implements msgpack.CustomDecoder

func (*TxPush) EncodeMsgpack

func (tx *TxPush) EncodeMsgpack(enc *msgpack.Encoder) error

EncodeMsgpack implements msgpack.CustomEncoder

func (*TxPush) FromMap

func (tx *TxPush) FromMap(_ map[string]interface{}) error

FromMap populates tx with a map generated by tx.ToMap.

func (*TxPush) GetBytesNoSig

func (tx *TxPush) GetBytesNoSig() []byte

GetBytesNoSig returns the serialized the transaction excluding the signature

func (*TxPush) GetEcoSize

func (tx *TxPush) GetEcoSize() int64

GetEcoSize returns the size of the transaction for use in economic calculations

func (*TxPush) GetFrom

func (tx *TxPush) GetFrom() identifier.Address

GetFrom returns the address of the transaction sender Because TxPush is a wrapper transaction, we use the pusher's address.

func (*TxPush) GetHash

func (tx *TxPush) GetHash() util.HexBytes

GetHash returns the hash of the transaction

func (*TxPush) GetID

func (tx *TxPush) GetID() string

GetID returns the hash of the push transaction

func (*TxPush) GetNonce

func (tx *TxPush) GetNonce() uint64

GetNonce returns the transaction nonce. Because TxPush is a wrapper transaction, we use the Account nonce of the pusher which is found in anyone of the pushed reference

func (*TxPush) GetNoteID added in v0.0.29

func (tx *TxPush) GetNoteID() string

GetNoteID returns the note ID of the push transaction

func (*TxPush) GetSize

func (tx *TxPush) GetSize() int64

GetSize returns the size of the tx object (excluding nothing)

func (*TxPush) GetTimestamp

func (tx *TxPush) GetTimestamp() int64

GetTimestamp return the transaction creation unix timestamp. Because TxPush is a wrapper transaction, we use the push note timestamp

func (*TxPush) Sign

func (tx *TxPush) Sign(privKey string) ([]byte, error)

Sign signs the transaction

func (*TxPush) ToMap

func (tx *TxPush) ToMap() map[string]interface{}

ToMap returns a map equivalent of the transaction

type TxRecipient

type TxRecipient struct {
	To identifier.Address `json:"to" msgpack:"to" mapstructure:"to"`
}

TxRecipient describes a transaction receiver

func (*TxRecipient) FromMap

func (tx *TxRecipient) FromMap(data map[string]interface{}) (err error)

FromMap populates tx with a map generated by tx.ToMap.

func (*TxRecipient) SetRecipient

func (tx *TxRecipient) SetRecipient(to identifier.Address)

SetRecipient sets the recipient

type TxRegisterPushKey

type TxRegisterPushKey struct {
	*TxCommon `json:",flatten" msgpack:"-" mapstructure:"-"`
	*TxType   `json:",flatten" msgpack:"-" mapstructure:"-"`
	PublicKey ed25519.PublicKey `json:"pubKey" msgpack:"pubKey" mapstructure:"pubKey"`
	Scopes    []string          `json:"scopes" msgpack:"scopes" mapstructure:"scopes"`
	FeeCap    util.String       `json:"feeCap" msgpack:"feeCap" mapstructure:"feeCap"`
}

TxRegisterPushKey implements BaseTx, it describes a transaction that registers a push key

func NewBareTxRegisterPushKey

func NewBareTxRegisterPushKey() *TxRegisterPushKey

NewBareTxRegisterPushKey returns an instance of TxRegisterPushKey with zero values

func (*TxRegisterPushKey) Bytes

func (tx *TxRegisterPushKey) Bytes() []byte

Bytes returns the serialized transaction

func (*TxRegisterPushKey) ComputeHash

func (tx *TxRegisterPushKey) ComputeHash() util.Bytes32

ComputeHash computes the hash of the transaction

func (*TxRegisterPushKey) DecodeMsgpack

func (tx *TxRegisterPushKey) DecodeMsgpack(dec *msgpack.Decoder) error

DecodeMsgpack implements msgpack.CustomDecoder

func (*TxRegisterPushKey) EncodeMsgpack

func (tx *TxRegisterPushKey) EncodeMsgpack(enc *msgpack.Encoder) error

EncodeMsgpack implements msgpack.CustomEncoder

func (*TxRegisterPushKey) FromMap

func (tx *TxRegisterPushKey) FromMap(data map[string]interface{}) error

FromMap populates tx with a map generated by tx.ToMap.

func (*TxRegisterPushKey) GetBytesNoSig

func (tx *TxRegisterPushKey) GetBytesNoSig() []byte

GetBytesNoSig returns the serialized the transaction excluding the signature

func (*TxRegisterPushKey) GetEcoSize

func (tx *TxRegisterPushKey) GetEcoSize() int64

GetEcoSize returns the size of the transaction for use in protocol economics

func (*TxRegisterPushKey) GetHash

func (tx *TxRegisterPushKey) GetHash() util.HexBytes

GetHash returns the hash of the transaction

func (*TxRegisterPushKey) GetID

func (tx *TxRegisterPushKey) GetID() string

GetID returns the id of the transaction (also the hash)

func (*TxRegisterPushKey) GetSize

func (tx *TxRegisterPushKey) GetSize() int64

GetSize returns the size of the tx object (excluding nothing)

func (*TxRegisterPushKey) Sign

func (tx *TxRegisterPushKey) Sign(privKey string) ([]byte, error)

Sign signs the transaction

func (*TxRegisterPushKey) ToMap

func (tx *TxRegisterPushKey) ToMap() map[string]interface{}

ToMap returns a map equivalent of the transaction

type TxRepoCreate

type TxRepoCreate struct {
	*TxCommon      `json:",flatten" msgpack:"-" mapstructure:"-"`
	*TxType        `json:",flatten" msgpack:"-" mapstructure:"-"`
	*TxValue       `json:",flatten" msgpack:"-" mapstructure:"-"`
	*TxDescription `json:",flatten" msgpack:"-" mapstructure:"-"`
	Name           string            `json:"name" msgpack:"name" mapstructure:"name"`
	Config         *state.RepoConfig `json:"config" msgpack:"config" mapstructure:"config"`
}

TxRepoCreate implements BaseTx, it describes a transaction that creates a repository for the signer

func NewBareTxRepoCreate

func NewBareTxRepoCreate() *TxRepoCreate

NewBareTxRepoCreate returns an instance of TxRepoCreate with zero values

func (*TxRepoCreate) Bytes

func (tx *TxRepoCreate) Bytes() []byte

Bytes returns the serialized transaction

func (*TxRepoCreate) ComputeHash

func (tx *TxRepoCreate) ComputeHash() util.Bytes32

ComputeHash computes the hash of the transaction

func (*TxRepoCreate) DecodeMsgpack

func (tx *TxRepoCreate) DecodeMsgpack(dec *msgpack.Decoder) error

DecodeMsgpack implements msgpack.CustomDecoder

func (*TxRepoCreate) EncodeMsgpack

func (tx *TxRepoCreate) EncodeMsgpack(enc *msgpack.Encoder) error

EncodeMsgpack implements msgpack.CustomEncoder

func (*TxRepoCreate) FromMap

func (tx *TxRepoCreate) FromMap(data map[string]interface{}) error

FromMap populates tx with a map generated by tx.ToMap.

func (*TxRepoCreate) GetBytesNoSig

func (tx *TxRepoCreate) GetBytesNoSig() []byte

GetBytesNoSig returns the serialized the transaction excluding the signature

func (*TxRepoCreate) GetEcoSize

func (tx *TxRepoCreate) GetEcoSize() int64

GetEcoSize returns the size of the transaction for use in protocol economics

func (*TxRepoCreate) GetHash

func (tx *TxRepoCreate) GetHash() util.HexBytes

GetHash returns the hash of the transaction

func (*TxRepoCreate) GetID

func (tx *TxRepoCreate) GetID() string

GetID returns the id of the transaction (also the hash)

func (*TxRepoCreate) GetSize

func (tx *TxRepoCreate) GetSize() int64

GetSize returns the size of the tx object (excluding nothing)

func (*TxRepoCreate) Sign

func (tx *TxRepoCreate) Sign(privKey string) ([]byte, error)

Sign signs the transaction

func (*TxRepoCreate) ToMap

func (tx *TxRepoCreate) ToMap() map[string]interface{}

ToMap returns a map equivalent of the transaction

type TxRepoProposalRegisterPushKey

type TxRepoProposalRegisterPushKey struct {
	*TxCommon         `json:",flatten" msgpack:"-" mapstructure:"-"`
	*TxType           `json:",flatten" msgpack:"-" mapstructure:"-"`
	*TxProposalCommon `json:",flatten" msgpack:"-" mapstructure:"-"`
	PushKeys          []string                   `json:"keys" msgpack:"keys" mapstructure:"keys"`
	Policies          []*state.ContributorPolicy `json:"policies" msgpack:"policies,omitempty" mapstructure:"policies,omitempty"`
	FeeMode           state.FeeMode              `json:"feeMode" msgpack:"feeMode,omitempty" mapstructure:"feeMode,omitempty"`
	FeeCap            util.String                `json:"feeCap" msgpack:"feeCap,omitempty" mapstructure:"feeCap,omitempty"`
	Namespace         string                     `json:"namespace" msgpack:"namespace,omitempty" mapstructure:"namespace"`
	NamespaceOnly     string                     `json:"namespaceOnly" msgpack:"namespaceOnly,omitempty" mapstructure:"namespaceOnly"`
}

TxRepoProposalRegisterPushKey implements BaseTx, it describes a repository proposal transaction for adding one or more contributors to a repository

func NewBareRepoProposalRegisterPushKey

func NewBareRepoProposalRegisterPushKey() *TxRepoProposalRegisterPushKey

NewBareRepoProposalRegisterPushKey returns an instance of TxRepoProposalRegisterPushKey with zero values

func (*TxRepoProposalRegisterPushKey) Bytes

func (tx *TxRepoProposalRegisterPushKey) Bytes() []byte

Bytes returns the serialized transaction

func (*TxRepoProposalRegisterPushKey) ComputeHash

func (tx *TxRepoProposalRegisterPushKey) ComputeHash() util.Bytes32

ComputeHash computes the hash of the transaction

func (*TxRepoProposalRegisterPushKey) DecodeMsgpack

func (tx *TxRepoProposalRegisterPushKey) DecodeMsgpack(dec *msgpack.Decoder) error

DecodeMsgpack implements msgpack.CustomDecoder

func (*TxRepoProposalRegisterPushKey) EncodeMsgpack

func (tx *TxRepoProposalRegisterPushKey) EncodeMsgpack(enc *msgpack.Encoder) error

EncodeMsgpack implements msgpack.CustomEncoder

func (*TxRepoProposalRegisterPushKey) FromMap

func (tx *TxRepoProposalRegisterPushKey) FromMap(data map[string]interface{}) error

FromMap populates fields from a map. An error will be returned when unable to convert types in map to expected types in the object.

func (*TxRepoProposalRegisterPushKey) GetBytesNoSig

func (tx *TxRepoProposalRegisterPushKey) GetBytesNoSig() []byte

GetBytesNoSig returns the serialized the transaction excluding the signature

func (*TxRepoProposalRegisterPushKey) GetEcoSize

func (tx *TxRepoProposalRegisterPushKey) GetEcoSize() int64

GetEcoSize returns the size of the transaction for use in protocol economics

func (*TxRepoProposalRegisterPushKey) GetHash

GetHash returns the hash of the transaction

func (*TxRepoProposalRegisterPushKey) GetID

GetID returns the id of the transaction (also the hash)

func (*TxRepoProposalRegisterPushKey) GetSize

func (tx *TxRepoProposalRegisterPushKey) GetSize() int64

GetSize returns the size of the tx object (excluding nothing)

func (*TxRepoProposalRegisterPushKey) Sign

func (tx *TxRepoProposalRegisterPushKey) Sign(privKey string) ([]byte, error)

Sign signs the transaction

func (*TxRepoProposalRegisterPushKey) ToMap

func (tx *TxRepoProposalRegisterPushKey) ToMap() map[string]interface{}

ToMap returns a map equivalent of the transaction

type TxRepoProposalSendFee

type TxRepoProposalSendFee struct {
	*TxCommon         `json:",flatten" msgpack:"-" mapstructure:"-"`
	*TxType           `json:",flatten" msgpack:"-" mapstructure:"-"`
	*TxProposalCommon `json:",flatten" msgpack:"-" mapstructure:"-"`
}

TxRepoProposalSendFee implements BaseTx, it describes a transaction for contributing to a proposal's deposit fee

func NewBareRepoProposalFeeSend

func NewBareRepoProposalFeeSend() *TxRepoProposalSendFee

NewBareRepoProposalFeeSend returns an instance of TxRepoProposalSendFee with zero values

func (*TxRepoProposalSendFee) Bytes

func (tx *TxRepoProposalSendFee) Bytes() []byte

Bytes returns the serialized transaction

func (*TxRepoProposalSendFee) ComputeHash

func (tx *TxRepoProposalSendFee) ComputeHash() util.Bytes32

ComputeHash computes the hash of the transaction

func (*TxRepoProposalSendFee) DecodeMsgpack

func (tx *TxRepoProposalSendFee) DecodeMsgpack(dec *msgpack.Decoder) error

DecodeMsgpack implements msgpack.CustomDecoder

func (*TxRepoProposalSendFee) EncodeMsgpack

func (tx *TxRepoProposalSendFee) EncodeMsgpack(enc *msgpack.Encoder) error

EncodeMsgpack implements msgpack.CustomEncoder

func (*TxRepoProposalSendFee) FromMap

func (tx *TxRepoProposalSendFee) FromMap(data map[string]interface{}) error

FromMap populates tx with a map generated by tx.ToMap.

func (*TxRepoProposalSendFee) GetBytesNoSig

func (tx *TxRepoProposalSendFee) GetBytesNoSig() []byte

GetBytesNoSig returns the serialized the transaction excluding the signature

func (*TxRepoProposalSendFee) GetEcoSize

func (tx *TxRepoProposalSendFee) GetEcoSize() int64

GetEcoSize returns the size of the transaction for use in protocol economics

func (*TxRepoProposalSendFee) GetHash

func (tx *TxRepoProposalSendFee) GetHash() util.HexBytes

GetHash returns the hash of the transaction

func (*TxRepoProposalSendFee) GetID

func (tx *TxRepoProposalSendFee) GetID() string

GetID returns the id of the transaction (also the hash)

func (*TxRepoProposalSendFee) GetSize

func (tx *TxRepoProposalSendFee) GetSize() int64

GetSize returns the size of the tx object (excluding nothing)

func (*TxRepoProposalSendFee) Sign

func (tx *TxRepoProposalSendFee) Sign(privKey string) ([]byte, error)

Sign signs the transaction

func (*TxRepoProposalSendFee) ToMap

func (tx *TxRepoProposalSendFee) ToMap() map[string]interface{}

ToMap returns a map equivalent of the transaction

type TxRepoProposalUpdate

type TxRepoProposalUpdate struct {
	*TxCommon         `json:",flatten" msgpack:"-" mapstructure:"-"`
	*TxType           `json:",flatten" msgpack:"-" mapstructure:"-"`
	*TxProposalCommon `json:",flatten" msgpack:"-" mapstructure:"-"`
	*TxDescription    `json:",flatten" msgpack:"-" mapstructure:"-"`
	Config            *state.RepoConfig `json:"config" msgpack:"config" mapstructure:"config"`
}

TxRepoProposalUpdate implements BaseTx, it describes a repository proposal transaction for updating a repository

func NewBareRepoProposalUpdate

func NewBareRepoProposalUpdate() *TxRepoProposalUpdate

NewBareRepoProposalUpdate returns an instance of TxRepoProposalUpdate with zero values

func (*TxRepoProposalUpdate) Bytes

func (tx *TxRepoProposalUpdate) Bytes() []byte

Bytes returns the serialized transaction

func (*TxRepoProposalUpdate) ComputeHash

func (tx *TxRepoProposalUpdate) ComputeHash() util.Bytes32

ComputeHash computes the hash of the transaction

func (*TxRepoProposalUpdate) DecodeMsgpack

func (tx *TxRepoProposalUpdate) DecodeMsgpack(dec *msgpack.Decoder) error

DecodeMsgpack implements msgpack.CustomDecoder

func (*TxRepoProposalUpdate) EncodeMsgpack

func (tx *TxRepoProposalUpdate) EncodeMsgpack(enc *msgpack.Encoder) error

EncodeMsgpack implements msgpack.CustomEncoder

func (*TxRepoProposalUpdate) FromMap

func (tx *TxRepoProposalUpdate) FromMap(data map[string]interface{}) error

FromMap populates tx with a map generated by tx.ToMap.

func (*TxRepoProposalUpdate) GetBytesNoSig

func (tx *TxRepoProposalUpdate) GetBytesNoSig() []byte

GetBytesNoSig returns the serialized the transaction excluding the signature

func (*TxRepoProposalUpdate) GetEcoSize

func (tx *TxRepoProposalUpdate) GetEcoSize() int64

GetEcoSize returns the size of the transaction for use in protocol economics

func (*TxRepoProposalUpdate) GetHash

func (tx *TxRepoProposalUpdate) GetHash() util.HexBytes

GetHash returns the hash of the transaction

func (*TxRepoProposalUpdate) GetID

func (tx *TxRepoProposalUpdate) GetID() string

GetID returns the id of the transaction (also the hash)

func (*TxRepoProposalUpdate) GetSize

func (tx *TxRepoProposalUpdate) GetSize() int64

GetSize returns the size of the tx object (excluding nothing)

func (*TxRepoProposalUpdate) Sign

func (tx *TxRepoProposalUpdate) Sign(privKey string) ([]byte, error)

Sign signs the transaction

func (*TxRepoProposalUpdate) ToMap

func (tx *TxRepoProposalUpdate) ToMap() map[string]interface{}

ToMap returns a map equivalent of the transaction

type TxRepoProposalUpsertOwner

type TxRepoProposalUpsertOwner struct {
	*TxCommon         `json:",flatten" msgpack:"-" mapstructure:"-"`
	*TxType           `json:",flatten" msgpack:"-" mapstructure:"-"`
	*TxProposalCommon `json:",flatten" msgpack:"-" mapstructure:"-"`
	Addresses         []string `json:"addresses" msgpack:"addresses" mapstructure:"addresses"`
	Veto              bool     `json:"veto" msgpack:"veto" mapstructure:"veto"`
}

TxRepoProposalUpsertOwner implements BaseTx, it describes a repository proposal transaction for adding a new owner to a repository

func NewBareRepoProposalUpsertOwner

func NewBareRepoProposalUpsertOwner() *TxRepoProposalUpsertOwner

NewBareRepoProposalUpsertOwner returns an instance of TxRepoProposalUpsertOwner with zero values

func (*TxRepoProposalUpsertOwner) Bytes

func (tx *TxRepoProposalUpsertOwner) Bytes() []byte

Bytes returns the serialized transaction

func (*TxRepoProposalUpsertOwner) ComputeHash

func (tx *TxRepoProposalUpsertOwner) ComputeHash() util.Bytes32

ComputeHash computes the hash of the transaction

func (*TxRepoProposalUpsertOwner) DecodeMsgpack

func (tx *TxRepoProposalUpsertOwner) DecodeMsgpack(dec *msgpack.Decoder) error

DecodeMsgpack implements msgpack.CustomDecoder

func (*TxRepoProposalUpsertOwner) EncodeMsgpack

func (tx *TxRepoProposalUpsertOwner) EncodeMsgpack(enc *msgpack.Encoder) error

EncodeMsgpack implements msgpack.CustomEncoder

func (*TxRepoProposalUpsertOwner) FromMap

func (tx *TxRepoProposalUpsertOwner) FromMap(data map[string]interface{}) error

FromMap populates tx with a map generated by tx.ToMap.

func (*TxRepoProposalUpsertOwner) GetBytesNoSig

func (tx *TxRepoProposalUpsertOwner) GetBytesNoSig() []byte

GetBytesNoSig returns the serialized the transaction excluding the signature

func (*TxRepoProposalUpsertOwner) GetEcoSize

func (tx *TxRepoProposalUpsertOwner) GetEcoSize() int64

GetEcoSize returns the size of the transaction for use in protocol economics

func (*TxRepoProposalUpsertOwner) GetHash

func (tx *TxRepoProposalUpsertOwner) GetHash() util.HexBytes

GetHash returns the hash of the transaction

func (*TxRepoProposalUpsertOwner) GetID

func (tx *TxRepoProposalUpsertOwner) GetID() string

GetID returns the id of the transaction (also the hash)

func (*TxRepoProposalUpsertOwner) GetSize

func (tx *TxRepoProposalUpsertOwner) GetSize() int64

GetSize returns the size of the tx object (excluding nothing)

func (*TxRepoProposalUpsertOwner) Sign

func (tx *TxRepoProposalUpsertOwner) Sign(privKey string) ([]byte, error)

Sign signs the transaction

func (*TxRepoProposalUpsertOwner) ToMap

func (tx *TxRepoProposalUpsertOwner) ToMap() map[string]interface{}

ToMap returns a map equivalent of the transaction

type TxRepoProposalVote

type TxRepoProposalVote struct {
	*TxCommon  `json:",flatten" msgpack:"-" mapstructure:"-"`
	*TxType    `json:",flatten" msgpack:"-" mapstructure:"-"`
	RepoName   string `json:"name" msgpack:"name" mapstructure:"name"`
	ProposalID string `json:"id" msgpack:"id" mapstructure:"id"`
	Vote       int    `json:"vote" msgpack:"vote" mapstructure:"vote"`
}

TxRepoProposalVote implements BaseTx, it describes a transaction for voting on a repository proposal

func NewBareRepoProposalVote

func NewBareRepoProposalVote() *TxRepoProposalVote

NewBareRepoProposalVote returns an instance of TxRepoProposalVote with zero values

func (*TxRepoProposalVote) Bytes

func (tx *TxRepoProposalVote) Bytes() []byte

Bytes returns the serialized transaction

func (*TxRepoProposalVote) ComputeHash

func (tx *TxRepoProposalVote) ComputeHash() util.Bytes32

ComputeHash computes the hash of the transaction

func (*TxRepoProposalVote) DecodeMsgpack

func (tx *TxRepoProposalVote) DecodeMsgpack(dec *msgpack.Decoder) error

DecodeMsgpack implements msgpack.CustomDecoder

func (*TxRepoProposalVote) EncodeMsgpack

func (tx *TxRepoProposalVote) EncodeMsgpack(enc *msgpack.Encoder) error

EncodeMsgpack implements msgpack.CustomEncoder

func (*TxRepoProposalVote) FromMap

func (tx *TxRepoProposalVote) FromMap(data map[string]interface{}) error

FromMap populates tx with a map generated by tx.ToMap.

func (*TxRepoProposalVote) GetBytesNoSig

func (tx *TxRepoProposalVote) GetBytesNoSig() []byte

GetBytesNoSig returns the serialized the transaction excluding the signature

func (*TxRepoProposalVote) GetEcoSize

func (tx *TxRepoProposalVote) GetEcoSize() int64

GetEcoSize returns the size of the transaction for use in protocol economics

func (*TxRepoProposalVote) GetHash

func (tx *TxRepoProposalVote) GetHash() util.HexBytes

GetHash returns the hash of the transaction

func (*TxRepoProposalVote) GetID

func (tx *TxRepoProposalVote) GetID() string

GetID returns the id of the transaction (also the hash)

func (*TxRepoProposalVote) GetSize

func (tx *TxRepoProposalVote) GetSize() int64

GetSize returns the size of the tx object (excluding nothing)

func (*TxRepoProposalVote) Sign

func (tx *TxRepoProposalVote) Sign(privKey string) ([]byte, error)

Sign signs the transaction

func (*TxRepoProposalVote) ToMap

func (tx *TxRepoProposalVote) ToMap() map[string]interface{}

ToMap returns a map equivalent of the transaction

type TxSetDelegateCommission

type TxSetDelegateCommission struct {
	*TxType    `json:",flatten" msgpack:"-" mapstructure:"-"`
	*TxCommon  `json:",flatten" msgpack:"-" mapstructure:"-"`
	Commission util.String `json:"commission" msgpack:"commission" mapstructure:"commission"`
}

TxSetDelegateCommission implements BaseTx, it describes a transaction that sets the signers delegate commission rate.

func NewBareTxSetDelegateCommission

func NewBareTxSetDelegateCommission() *TxSetDelegateCommission

NewBareTxSetDelegateCommission returns an instance of TxSetDelegateCommission with zero values

func (*TxSetDelegateCommission) Bytes

func (tx *TxSetDelegateCommission) Bytes() []byte

Bytes returns the serialized transaction

func (*TxSetDelegateCommission) ComputeHash

func (tx *TxSetDelegateCommission) ComputeHash() util.Bytes32

ComputeHash computes the hash of the transaction

func (*TxSetDelegateCommission) DecodeMsgpack

func (tx *TxSetDelegateCommission) DecodeMsgpack(dec *msgpack.Decoder) error

DecodeMsgpack implements msgpack.CustomDecoder

func (*TxSetDelegateCommission) EncodeMsgpack

func (tx *TxSetDelegateCommission) EncodeMsgpack(enc *msgpack.Encoder) error

EncodeMsgpack implements msgpack.CustomEncoder

func (*TxSetDelegateCommission) FromMap

func (tx *TxSetDelegateCommission) FromMap(data map[string]interface{}) error

FromMap populates tx with a map generated by tx.ToMap.

func (*TxSetDelegateCommission) GetBytesNoSig

func (tx *TxSetDelegateCommission) GetBytesNoSig() []byte

GetBytesNoSig returns the serialized the transaction excluding the signature

func (*TxSetDelegateCommission) GetEcoSize

func (tx *TxSetDelegateCommission) GetEcoSize() int64

GetEcoSize returns the size of the transaction for use in protocol economics

func (*TxSetDelegateCommission) GetHash

func (tx *TxSetDelegateCommission) GetHash() util.HexBytes

GetHash returns the hash of the transaction

func (*TxSetDelegateCommission) GetID

func (tx *TxSetDelegateCommission) GetID() string

GetID returns the id of the transaction (also the hash)

func (*TxSetDelegateCommission) GetSize

func (tx *TxSetDelegateCommission) GetSize() int64

GetSize returns the size of the tx object (excluding nothing)

func (*TxSetDelegateCommission) Sign

func (tx *TxSetDelegateCommission) Sign(privKey string) ([]byte, error)

Sign signs the transaction

func (*TxSetDelegateCommission) ToMap

func (tx *TxSetDelegateCommission) ToMap() map[string]interface{}

ToMap returns a map equivalent of the transaction

type TxTicketPurchase

type TxTicketPurchase struct {
	*TxType   `json:",flatten" msgpack:"-" mapstructure:"-"`
	*TxCommon `json:",flatten" msgpack:"-" mapstructure:"-"`
	*TxValue  `json:",flatten" msgpack:"-" mapstructure:"-"`
	Delegate  ed25519.PublicKey `json:"delegate" msgpack:"delegate" mapstructure:"delegate"`
	BLSPubKey util.Bytes        `json:"blsPubKey" msgpack:"blsPubKey" mapstructure:"blsPubKey"`
}

TxTicketPurchase implements BaseTx, it describes a transaction that purchases a ticket from the signer or delegates to another address.

func NewBareTxTicketPurchase

func NewBareTxTicketPurchase(ticketType types.TxCode) *TxTicketPurchase

NewBareTxTicketPurchase returns an instance of TxTicketPurchase with zero values

func (*TxTicketPurchase) Bytes

func (tx *TxTicketPurchase) Bytes() []byte

Bytes returns the serialized transaction

func (*TxTicketPurchase) ComputeHash

func (tx *TxTicketPurchase) ComputeHash() util.Bytes32

ComputeHash computes the hash of the transaction

func (*TxTicketPurchase) DecodeMsgpack

func (tx *TxTicketPurchase) DecodeMsgpack(dec *msgpack.Decoder) error

DecodeMsgpack implements msgpack.CustomDecoder

func (*TxTicketPurchase) EncodeMsgpack

func (tx *TxTicketPurchase) EncodeMsgpack(enc *msgpack.Encoder) error

EncodeMsgpack implements msgpack.CustomEncoder

func (*TxTicketPurchase) FromMap

func (tx *TxTicketPurchase) FromMap(data map[string]interface{}) error

FromMap populates tx with a map generated by tx.ToMap.

func (*TxTicketPurchase) GetBytesNoSig

func (tx *TxTicketPurchase) GetBytesNoSig() []byte

GetBytesNoSig returns the serialized the transaction excluding the signature

func (*TxTicketPurchase) GetEcoSize

func (tx *TxTicketPurchase) GetEcoSize() int64

GetEcoSize returns the size of the transaction for use in protocol economics

func (*TxTicketPurchase) GetHash

func (tx *TxTicketPurchase) GetHash() util.HexBytes

GetHash returns the hash of the transaction

func (*TxTicketPurchase) GetID

func (tx *TxTicketPurchase) GetID() string

GetID returns the id of the transaction (also the hash)

func (*TxTicketPurchase) GetSize

func (tx *TxTicketPurchase) GetSize() int64

GetSize returns the size of the tx object (excluding nothing)

func (*TxTicketPurchase) Sign

func (tx *TxTicketPurchase) Sign(privKey string) ([]byte, error)

Sign signs the transaction

func (*TxTicketPurchase) ToMap

func (tx *TxTicketPurchase) ToMap() map[string]interface{}

ToMap returns a map equivalent of the transaction

type TxTicketUnbond

type TxTicketUnbond struct {
	*TxType    `json:",flatten" msgpack:"-" mapstructure:"-"`
	*TxCommon  `json:",flatten" msgpack:"-" mapstructure:"-"`
	TicketHash util.HexBytes `json:"hash" msgpack:"hash" mapstructure:"hash"`
}

TxTicketUnbond implements BaseTx, it describes a transaction that unbonds a staked coin owned by the signer

func NewBareTxTicketUnbond

func NewBareTxTicketUnbond(ticketType types.TxCode) *TxTicketUnbond

NewBareTxTicketUnbond returns an instance of TxTicketUnbond with zero values

func (*TxTicketUnbond) Bytes

func (tx *TxTicketUnbond) Bytes() []byte

Bytes returns the serialized transaction

func (*TxTicketUnbond) ComputeHash

func (tx *TxTicketUnbond) ComputeHash() util.Bytes32

ComputeHash computes the hash of the transaction

func (*TxTicketUnbond) DecodeMsgpack

func (tx *TxTicketUnbond) DecodeMsgpack(dec *msgpack.Decoder) error

DecodeMsgpack implements msgpack.CustomDecoder

func (*TxTicketUnbond) EncodeMsgpack

func (tx *TxTicketUnbond) EncodeMsgpack(enc *msgpack.Encoder) error

EncodeMsgpack implements msgpack.CustomEncoder

func (*TxTicketUnbond) FromMap

func (tx *TxTicketUnbond) FromMap(data map[string]interface{}) error

FromMap populates tx with a map generated by tx.ToMap.

func (*TxTicketUnbond) GetBytesNoSig

func (tx *TxTicketUnbond) GetBytesNoSig() []byte

GetBytesNoSig returns the serialized the transaction excluding the signature

func (*TxTicketUnbond) GetEcoSize

func (tx *TxTicketUnbond) GetEcoSize() int64

GetEcoSize returns the size of the transaction for use in protocol economics

func (*TxTicketUnbond) GetHash

func (tx *TxTicketUnbond) GetHash() util.HexBytes

GetHash returns the hash of the transaction

func (*TxTicketUnbond) GetID

func (tx *TxTicketUnbond) GetID() string

GetID returns the id of the transaction (also the hash)

func (*TxTicketUnbond) GetSize

func (tx *TxTicketUnbond) GetSize() int64

GetSize returns the size of the tx object (excluding nothing)

func (*TxTicketUnbond) Sign

func (tx *TxTicketUnbond) Sign(privKey string) ([]byte, error)

Sign signs the transaction

func (*TxTicketUnbond) ToMap

func (tx *TxTicketUnbond) ToMap() map[string]interface{}

ToMap returns a map equivalent of the transaction

type TxType

type TxType struct {
	Type types.TxCode `json:"type" msgpack:"type" mapstructure:"type"`
}

TxType implements some of BaseTx, it includes type information about a transaction

func (*TxType) FromMap

func (tx *TxType) FromMap(data map[string]interface{}) (err error)

FromMap populates tx with a map generated by tx.ToMap.

func (*TxType) GetType

func (tx *TxType) GetType() types.TxCode

GetType returns the type of the transaction

func (*TxType) Is

func (tx *TxType) Is(txType types.TxCode) bool

Is checks if the tx is a given type

type TxUpDelPushKey

type TxUpDelPushKey struct {
	*TxCommon    `json:",flatten" msgpack:"-" mapstructure:"-"`
	*TxType      `json:",flatten" msgpack:"-" mapstructure:"-"`
	ID           string      `json:"id" msgpack:"id" mapstructure:"id"`
	AddScopes    []string    `json:"addScopes" msgpack:"addScopes" mapstructure:"addScopes"`
	RemoveScopes []int       `json:"removeScopes" msgpack:"removeScopes" mapstructure:"removeScopes"`
	FeeCap       util.String `json:"feeCap" msgpack:"feeCap" mapstructure:"feeCap"`
	Delete       bool        `json:"delete" msgpack:"delete" mapstructure:"delete"`
}

TxUpDelPushKey implements BaseTx, it describes a transaction used to update or delete a registered push key

func NewBareTxUpDelPushKey

func NewBareTxUpDelPushKey() *TxUpDelPushKey

NewBareTxUpDelPushKey returns an instance of TxUpDelPushKey with zero values

func (*TxUpDelPushKey) Bytes

func (tx *TxUpDelPushKey) Bytes() []byte

Bytes returns the serialized transaction

func (*TxUpDelPushKey) ComputeHash

func (tx *TxUpDelPushKey) ComputeHash() util.Bytes32

ComputeHash computes the hash of the transaction

func (*TxUpDelPushKey) DecodeMsgpack

func (tx *TxUpDelPushKey) DecodeMsgpack(dec *msgpack.Decoder) error

DecodeMsgpack implements msgpack.CustomDecoder

func (*TxUpDelPushKey) EncodeMsgpack

func (tx *TxUpDelPushKey) EncodeMsgpack(enc *msgpack.Encoder) error

EncodeMsgpack implements msgpack.CustomEncoder

func (*TxUpDelPushKey) FromMap

func (tx *TxUpDelPushKey) FromMap(data map[string]interface{}) error

FromMap populates tx with a map generated by tx.ToMap.

func (*TxUpDelPushKey) GetBytesNoSig

func (tx *TxUpDelPushKey) GetBytesNoSig() []byte

GetBytesNoSig returns the serialized the transaction excluding the signature

func (*TxUpDelPushKey) GetEcoSize

func (tx *TxUpDelPushKey) GetEcoSize() int64

GetEcoSize returns the size of the transaction for use in protocol economics

func (*TxUpDelPushKey) GetHash

func (tx *TxUpDelPushKey) GetHash() util.HexBytes

GetHash returns the hash of the transaction

func (*TxUpDelPushKey) GetID

func (tx *TxUpDelPushKey) GetID() string

GetID returns the id of the transaction (also the hash)

func (*TxUpDelPushKey) GetSize

func (tx *TxUpDelPushKey) GetSize() int64

GetSize returns the size of the tx object (excluding nothing)

func (*TxUpDelPushKey) Sign

func (tx *TxUpDelPushKey) Sign(privKey string) ([]byte, error)

Sign signs the transaction

func (*TxUpDelPushKey) ToMap

func (tx *TxUpDelPushKey) ToMap() map[string]interface{}

ToMap returns a map equivalent of the transaction

type TxValue

type TxValue struct {
	Value util.String `json:"value" msgpack:"value" mapstructure:"value"`
}

TxValue describes a transaction value

func (*TxValue) FromMap

func (tx *TxValue) FromMap(data map[string]interface{}) (err error)

FromMap populates tx with a map generated by tx.ToMap.

func (*TxValue) SetValue

func (tx *TxValue) SetValue(value util.String)

SetValue sets the value

Jump to

Keyboard shortcuts

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