Documentation ¶
Overview ¶
Package txbuild houses the functions for creating transactions to create, interact with, and finally close a Starlight channel.
Index ¶
- func Close(p CloseParams) (*txnbuild.Transaction, error)
- func CreateChannelAccount(p CreateChannelAccountParams) (*txnbuild.Transaction, error)
- func Declaration(p DeclarationParams) (*txnbuild.Transaction, error)
- func Open(p OpenParams) (*txnbuild.Transaction, error)
- type CloseParams
- type CreateChannelAccountParams
- type DeclarationParams
- type OpenParams
- type TransactionType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Close ¶
func Close(p CloseParams) (*txnbuild.Transaction, error)
func CreateChannelAccount ¶
func CreateChannelAccount(p CreateChannelAccountParams) (*txnbuild.Transaction, error)
func Declaration ¶
func Declaration(p DeclarationParams) (*txnbuild.Transaction, error)
func Open ¶
func Open(p OpenParams) (*txnbuild.Transaction, error)
Types ¶
type CloseParams ¶
type CloseParams struct { ObservationPeriodTime time.Duration ObservationPeriodLedgerGap uint32 InitiatorSigner *keypair.FromAddress ResponderSigner *keypair.FromAddress InitiatorChannelAccount *keypair.FromAddress ResponderChannelAccount *keypair.FromAddress StartSequence int64 IterationNumber int64 AmountToInitiator int64 AmountToResponder int64 Asset txnbuild.Asset }
type CreateChannelAccountParams ¶
type CreateChannelAccountParams struct { Creator *keypair.FromAddress ChannelAccount *keypair.FromAddress SequenceNumber int64 Asset txnbuild.BasicAsset }
type DeclarationParams ¶
type DeclarationParams struct { InitiatorChannelAccount *keypair.FromAddress StartSequence int64 IterationNumber int64 IterationNumberExecuted int64 CloseTxHash [32]byte ConfirmingSigner *keypair.FromAddress }
type OpenParams ¶
type OpenParams struct { InitiatorSigner *keypair.FromAddress ResponderSigner *keypair.FromAddress InitiatorChannelAccount *keypair.FromAddress ResponderChannelAccount *keypair.FromAddress StartSequence int64 Asset txnbuild.Asset ExpiresAt time.Time DeclarationTxHash [32]byte CloseTxHash [32]byte ConfirmingSigner *keypair.FromAddress }
type TransactionType ¶
type TransactionType string
const ( TransactionTypeUnrecognized TransactionType = "unrecognized" TransactionTypeOpen TransactionType = "open" TransactionTypeDeclaration TransactionType = "declaration" TransactionTypeClose TransactionType = "close" )
func SequenceNumberToTransactionType ¶
func SequenceNumberToTransactionType(startingSeqNum, seqNum int64) TransactionType
Source Files ¶
Click to show internal directories.
Click to hide internal directories.