txbuild

package
v0.0.0-...-9190965 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Overview

Package txbuild houses the functions for creating transactions to create, interact with, and finally close a Starlight channel.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Declaration

func Declaration(p DeclarationParams) (*txnbuild.Transaction, error)

func Open

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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