pkg

package
v1.2.10 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: MIT Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExecuteFile

func ExecuteFile(ctx context.Context, filename string, simBvns int, client *client.Client) error

func InterpUseSession

func InterpUseSession(s *Session, I interface {
	Use(values interp.Exports) error
	Eval(src string) (res reflect.Value, err error)
})

Types

type Abort

type Abort struct {
	Value interface{}
}

type Engine

type Engine interface {
	GetAccount(*URL) (protocol.Account, error)
	GetDirectory(*URL) ([]*url.URL, error)
	GetTransaction([32]byte) (*protocol.Transaction, error)
	Submit(*messaging.Envelope) (*protocol.TransactionStatus, error)
	WaitFor(txn [32]byte, delivered bool) ([]*protocol.TransactionStatus, []*protocol.Transaction, error)
}

type Keyish

type Keyish = interface{}

Keyish indicates that the parameter must be convertable to a key.

type NetEngine

type NetEngine struct {
	*client.Client
}

func (NetEngine) GetAccount

func (e NetEngine) GetAccount(accountUrl *URL) (protocol.Account, error)

func (NetEngine) GetDirectory

func (e NetEngine) GetDirectory(account *URL) ([]*URL, error)

func (NetEngine) GetTransaction

func (e NetEngine) GetTransaction(txid [32]byte) (*protocol.Transaction, error)

func (NetEngine) Submit

func (e NetEngine) Submit(envelope *messaging.Envelope) (*protocol.TransactionStatus, error)

func (NetEngine) WaitFor

func (e NetEngine) WaitFor(hash [32]byte, delivered bool) ([]*protocol.TransactionStatus, []*protocol.Transaction, error)

type Numish

type Numish = interface{}

Numish indicates that the parameter must be convertable to a number.

type Output

type Output struct {
	Mime  string
	Value []byte
}

type Session

type Session struct {
	Filename string
	Output   func(...Output)
	Engine   Engine
	// contains filtered or unexported fields
}

func (*Session) Abort

func (s *Session) Abort(value interface{})

func (*Session) Abortf

func (s *Session) Abortf(format string, args ...interface{})

func (*Session) AcmeAmount

func (s *Session) AcmeAmount(v float64) *big.Int

func (*Session) Amount

func (s *Session) Amount(v float64, precision uint64) *big.Int

func (*Session) Assert

func (s *Session) Assert(condition bool, format string, args ...interface{})

func (*Session) Dump

func (s *Session) Dump(v interface{})

func (*Session) Faucet

func (s *Session) Faucet(account Urlish) *submittedTxn

func (*Session) GenerateKey

func (s *Session) GenerateKey(values ...interface{}) ed25519.PrivateKey

func (*Session) Get

func (s *Session) Get(query interface{}, subquery ...interface{}) interface{}

func (*Session) GetAccount

func (s *Session) GetAccount(query Urlish) protocol.Account

func (*Session) GetAccountAs

func (s *Session) GetAccountAs(query Urlish, target interface{})

func (*Session) GetAs

func (s *Session) GetAs(u interface{}, query interface{}, subquery ...interface{})

func (*Session) GetDirectory

func (s *Session) GetDirectory(query Urlish) []*URL

func (*Session) KeyEntry

func (s *Session) KeyEntry() bldKeyEntry

func (*Session) LiteAddress

func (s *Session) LiteAddress(keyOrEntry interface{}, args ...interface{}) *URL

func (*Session) Print

func (s *Session) Print(v interface{})

func (*Session) SetStartTime

func (s *Session) SetStartTime(time time.Time)

func (*Session) Show

func (s *Session) Show(v interface{})

func (*Session) Transaction

func (s *Session) Transaction(principal Urlish) bldTxn

func (*Session) TryGetAccount

func (s *Session) TryGetAccount(query Urlish) (protocol.Account, bool)

func (*Session) TryGetAccountAs

func (s *Session) TryGetAccountAs(query Urlish, target interface{}) bool

func (*Session) TryGetDirectory

func (s *Session) TryGetDirectory(query Urlish) ([]*URL, bool)

func (*Session) UseNetwork

func (s *Session) UseNetwork(client *client.Client)

func (*Session) UseSimulator

func (s *Session) UseSimulator(bvnCount int)

func (*Session) WaitForSubmitted

func (s *Session) WaitForSubmitted() []completedFlow

type SimEngine

type SimEngine struct {
	*simulator.Simulator
	// contains filtered or unexported fields
}

func (*SimEngine) GetAccount

func (s *SimEngine) GetAccount(url *URL) (protocol.Account, error)

func (*SimEngine) GetDirectory

func (s *SimEngine) GetDirectory(account *URL) ([]*URL, error)

func (*SimEngine) GetTransaction

func (s *SimEngine) GetTransaction(hash [32]byte) (*protocol.Transaction, error)

func (*SimEngine) Submit

func (s *SimEngine) Submit(envelope *messaging.Envelope) (*protocol.TransactionStatus, error)

func (*SimEngine) WaitFor

func (s *SimEngine) WaitFor(hash [32]byte, delivered bool) ([]*protocol.TransactionStatus, []*protocol.Transaction, error)

type URL

type URL = url.URL

type Urlish

type Urlish = interface{}

Urlish indicates that the parameter must be convertable to a URL.

Jump to

Keyboard shortcuts

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