transaction

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SignAndSerializeTransaction

func SignAndSerializeTransaction(keyPair key.KeyPair, txn Transaction) (blob string, err error)

Types

type SignedTransaction

type SignedTransaction struct {
	Transaction Transaction
	Signature   signature.Signature

	SerializedTransaction []byte `borsh_skip:"true"`
	// contains filtered or unexported fields
}

func NewSignedTransaction

func NewSignedTransaction(keyPair key.KeyPair, transaction Transaction) (stxn SignedTransaction, err error)

func (*SignedTransaction) Hash

func (st *SignedTransaction) Hash() hash.CryptoHash

func (SignedTransaction) Serialize

func (st SignedTransaction) Serialize() (serialized string, err error)

func (*SignedTransaction) Size

func (st *SignedTransaction) Size() int

func (*SignedTransaction) Verify

func (st *SignedTransaction) Verify(pubKey key.PublicKey) (ok bool, err error)

type Transaction

type Transaction struct {
	SignerID   types.AccountID
	PublicKey  key.PublicKey
	Nonce      types.Nonce
	ReceiverID types.AccountID
	BlockHash  hash.CryptoHash
	Actions    []action.Action
}

func (Transaction) Hash

func (t Transaction) Hash() (txnHash hash.CryptoHash, serialized []byte, err error)

func (Transaction) HashAndSign

func (t Transaction) HashAndSign(keyPair key.KeyPair) (txnHash hash.CryptoHash, serialized []byte, sig signature.Signature, err error)

Jump to

Keyboard shortcuts

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