transaction

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 12 Imported by: 3

Documentation

Index

Constants

View Source
const (
	TransactionNonceLength = 32
)

Variables

This section is empty.

Functions

func HashToShortHash

func HashToShortHash(hash common.Uint256, salt []byte, size uint32) []byte

func NewCoinbase

func NewCoinbase(sender common.Uint160, recievers [7]common.Uint160, totalAmount common.Fixed64, distributedRewardsPerRole [7]common.Fixed64) *pb.Coinbase

func NewDeleteName

func NewDeleteName(registrant []byte, name string) *pb.DeleteName

func NewGenerateID

func NewGenerateID(publicKey, sender []byte, regFee common.Fixed64, version int32) *pb.GenerateID

func NewIssueAsset

func NewIssueAsset(sender common.Uint160, name, symbol string, precision uint32, totalSupply common.Fixed64) *pb.IssueAsset

func NewMsgTx

func NewMsgTx(payload *pb.Payload, nonce uint64, fee common.Fixed64, attrs []byte) *pb.Transaction

func NewNanoPay

func NewNanoPay(sender, recipient common.Uint160, id uint64, amount common.Fixed64, txnExpiration, nanoPayExpiration uint32) *pb.NanoPay

func NewRegisterName

func NewRegisterName(registrant []byte, name string, fee int64) *pb.RegisterName

func NewSigChainTxn

func NewSigChainTxn(sigChain []byte, submitter common.Uint160) *pb.SigChainTxn

func NewSubscribe

func NewSubscribe(subscriber []byte, id, topic string, duration uint32, meta string) *pb.Subscribe

func NewSwapAsset

func NewSwapAsset(sender, recipient common.Uint160, amount common.Fixed64) *pb.SwapAsset

func NewTransferAsset

func NewTransferAsset(sender, recipient common.Uint160, amount common.Fixed64) *pb.TransferAsset

func NewTransferName

func NewTransferName(registrant []byte, receipt []byte, name string) *pb.TransferName

func NewUnsubscribe

func NewUnsubscribe(subscriber []byte, id, topic string) *pb.Unsubscribe

func Pack

func Pack(plType pb.PayloadType, payload proto.Message) (*pb.Payload, error)

func Unpack

func Unpack(payload *pb.Payload) (proto.Message, error)

Types

type Transaction

type Transaction struct {
	*pb.Transaction
	// contains filtered or unexported fields
}

func NewDeleteNameTransaction

func NewDeleteNameTransaction(registrant []byte, name string, nonce uint64, fee common.Fixed64) (*Transaction, error)

func NewGenerateIDTransaction

func NewGenerateIDTransaction(publicKey, sender []byte, regFee common.Fixed64, version int32, nonce uint64, fee common.Fixed64, attrs []byte) (*Transaction, error)

func NewIssueAssetTransaction

func NewIssueAssetTransaction(sender common.Uint160, name, symbol string, totalSupply common.Fixed64, precision uint32, nonce uint64, fee common.Fixed64) (*Transaction, error)

func NewNanoPayTransaction

func NewNanoPayTransaction(sender, recipient common.Uint160, id uint64, amount common.Fixed64, txnExpiration, nanoPayExpiration uint32) (*Transaction, error)

func NewRegisterNameTransaction

func NewRegisterNameTransaction(registrant []byte, name string, nonce uint64, regFee common.Fixed64, fee common.Fixed64) (*Transaction, error)

func NewSigChainTransaction

func NewSigChainTransaction(sigChain []byte, submitter common.Uint160, nonce uint64) (*Transaction, error)

func NewSubscribeTransaction

func NewSubscribeTransaction(subscriber []byte, identifier string, topic string, duration uint32, meta string, nonce uint64, fee common.Fixed64) (*Transaction, error)

func NewSwapAssetTransaction

func NewSwapAssetTransaction(sender, recipient common.Uint160, nonce uint64, value, fee common.Fixed64) (*Transaction, error)

func NewSwapRDCAssetTransaction

func NewSwapRDCAssetTransaction(sender, recipient common.Uint160, nonce uint64, value, fee common.Fixed64) (*Transaction, error)

func NewTransferAssetTransaction

func NewTransferAssetTransaction(sender, recipient common.Uint160, nonce uint64, value, fee common.Fixed64) (*Transaction, error)

func NewTransferNameTransaction

func NewTransferNameTransaction(registrant []byte, to []byte, name string, nonce uint64, fee common.Fixed64) (*Transaction, error)

func NewTransferRDCAssetTransaction

func NewTransferRDCAssetTransaction(sender, recipient common.Uint160, nonce uint64, value, fee common.Fixed64) (*Transaction, error)

func NewUnsubscribeTransaction

func NewUnsubscribeTransaction(subscriber []byte, identifier string, topic string, nonce uint64, fee common.Fixed64) (*Transaction, error)

func (*Transaction) DeserializeUnsigned

func (tx *Transaction) DeserializeUnsigned(r io.Reader) error

func (*Transaction) GetInfo

func (tx *Transaction) GetInfo() ([]byte, error)

func (*Transaction) GetMessage

func (tx *Transaction) GetMessage() []byte

func (*Transaction) GetProgramHashes

func (tx *Transaction) GetProgramHashes() ([]common.Uint160, error)

func (*Transaction) GetPrograms

func (tx *Transaction) GetPrograms() []*pb.Program

func (*Transaction) GetSize

func (tx *Transaction) GetSize() uint32

func (*Transaction) Hash

func (tx *Transaction) Hash() common.Uint256

func (*Transaction) Marshal

func (tx *Transaction) Marshal() (buf []byte, err error)

func (*Transaction) SerializeUnsigned

func (tx *Transaction) SerializeUnsigned(w io.Writer) error

Serialize the Transaction data without contracts

func (*Transaction) SetHash

func (tx *Transaction) SetHash(hash common.Uint256)

func (*Transaction) SetPrograms

func (tx *Transaction) SetPrograms(programs []*pb.Program)

func (*Transaction) ShortHash

func (tx *Transaction) ShortHash(salt []byte, size uint32) []byte

func (*Transaction) Unmarshal

func (tx *Transaction) Unmarshal(buf []byte) error

func (*Transaction) VerifySignature

func (txn *Transaction) VerifySignature() error

Jump to

Keyboard shortcuts

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