transaction

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2021 License: Apache-2.0, BSD-2-Clause Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAliasOutput

func GetAliasOutput(tx *ledgerstate.Transaction, aliasAddr ledgerstate.Address) *ledgerstate.AliasOutput

GetAliasOutput return output or nil if not found

func GetAliasOutputFromEssence

func GetAliasOutputFromEssence(essence *ledgerstate.TransactionEssence, aliasAddr ledgerstate.Address) *ledgerstate.AliasOutput

func NewChainOriginTransaction

func NewChainOriginTransaction(
	keyPair *ed25519.KeyPair,
	stateAddress ledgerstate.Address,
	balances colored.Balances,
	timestamp time.Time,
	allInputs ...ledgerstate.Output,
) (*ledgerstate.Transaction, *iscp.ChainID, error)

NewChainOriginTransaction creates new origin transaction for the self-governed chain returns the transaction and newly minted chain ID

func NewRequestTransaction

func NewRequestTransaction(par NewRequestTransactionParams) (*ledgerstate.Transaction, error)

NewRequestTransaction creates a transaction including one or more requests to a chain. To avoid empty transfer it defaults to 1 iota

func NewRootInitRequestTransaction

func NewRootInitRequestTransaction(
	keyPair *ed25519.KeyPair,
	chainID *iscp.ChainID,
	description string,
	timestamp time.Time,
	allInputs ...ledgerstate.Output,
) (*ledgerstate.Transaction, error)

NewRootInitRequestTransaction is a first request to be sent to the uninitialized chain. At this moment it only is able to process this specific request the request contains minimum data needed to bootstrap the chain TransactionEssence must be signed by the same address which created origin transaction

Types

type NewRequestTransactionParams

type NewRequestTransactionParams struct {
	SenderKeyPair  *ed25519.KeyPair
	UnspentOutputs []ledgerstate.Output
	Requests       []RequestParams
}

type RequestParams

type RequestParams struct {
	ChainID    *iscp.ChainID
	Contract   iscp.Hname
	EntryPoint iscp.Hname
	Transfer   colored.Balances
	Args       requestargs.RequestArgs
}

Jump to

Keyboard shortcuts

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