txnbuild

package
v0.0.0-...-5b4d345 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	ID             string
	SequenceNumber xdr.SequenceNumber
}

TODO: Replace use of Horizon Account with simpler Account object here

type BumpSequence

type BumpSequence struct {
	BumpTo int64
	// contains filtered or unexported fields
}

BumpSequence represents the Stellar bump sequence operation. See https://www.stellar.org/developers/guides/concepts/list-of-operations.html

func (*BumpSequence) BuildXDR

func (bs *BumpSequence) BuildXDR() (xdr.Operation, error)

BuildXDR for BumpSequence returns a fully configured XDR Operation.

type CreateAccount

type CreateAccount struct {
	Destination string
	Amount      string
	Asset       string // TODO: Not used yet
	// contains filtered or unexported fields
}

CreateAccount represents the Stellar create account operation. See https://www.stellar.org/developers/guides/concepts/list-of-operations.html

func (*CreateAccount) BuildXDR

func (ca *CreateAccount) BuildXDR() (xdr.Operation, error)

BuildXDR for CreateAccount returns a fully configured XDR Operation.

type Inflation

type Inflation struct {
	// contains filtered or unexported fields
}

Inflation represents the Stellar inflation operation. See https://www.stellar.org/developers/guides/concepts/list-of-operations.html

func (*Inflation) BuildXDR

func (inf *Inflation) BuildXDR() (xdr.Operation, error)

BuildXDR for Inflation returns a fully configured XDR Operation.

type Operation

type Operation interface {
	BuildXDR() (xdr.Operation, error)
}

Operation represents the operation types of the Stellar network.

type Payment

type Payment struct {
	Destination string
	Amount      string
	Asset       string // TODO: Not used yet
	// contains filtered or unexported fields
}

Payment represents the Stellar payment operation. See https://www.stellar.org/developers/guides/concepts/list-of-operations.html

func (*Payment) BuildXDR

func (p *Payment) BuildXDR() (xdr.Operation, error)

BuildXDR for Payment returns a fully configured XDR Operation.

type Transaction

type Transaction struct {
	SourceAccount Account
	Operations    []Operation

	BaseFee uint64 // TODO: Why is this a uint 64? Can it be a plain int?

	Network string
	// contains filtered or unexported fields
}

Transaction represents a Stellar Transaction.

func (*Transaction) Base64

func (tx *Transaction) Base64() (string, error)

Base64 returns the base 64 XDR representation of the Transaction.

func (*Transaction) Build

func (tx *Transaction) Build() error

Build for Transaction completely configures the Transaction. After calling Build, the Transaction is ready to be serialised or signed.

func (*Transaction) Hash

func (tx *Transaction) Hash() ([32]byte, error)

Hash provides a signable object representing the Transaction on the specified network.

func (*Transaction) MarshalBinary

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

MarshalBinary returns the binary XDR representation of the Transaction.

func (*Transaction) SetDefaultFee

func (tx *Transaction) SetDefaultFee()

SetDefaultFee sets a sensible minimum default for the Transaction fee, if one has not already been set. It is a linear function of the number of Operations in the Transaction.

func (*Transaction) Sign

func (tx *Transaction) Sign(kp *keypair.Full) error

Sign for Transaction signs a previously built transaction. A signed transaction may be submitted to the network.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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