helpers

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreditCredits

func CreditCredits(t testing.TB, db database.Updater, account *url.URL, amount uint64)

func CreditTokens

func CreditTokens(t testing.TB, db database.Updater, account *url.URL, amount *big.Int)

func GetAccount

func GetAccount[T protocol.Account](t testing.TB, db database.Viewer, account *url.URL) T

func MakeAccount

func MakeAccount(t testing.TB, db database.Updater, account ...protocol.Account)

MakeAccount writes the account's main state, adds a directory entry to the parent, and inherits the parent's authority if non is specified.

func MakeIdentity

func MakeIdentity(t testing.TB, db database.Updater, u *url.URL, pubKeys ...[]byte)

func MakeIdentityWithCredits added in v1.1.0

func MakeIdentityWithCredits(t testing.TB, db database.Updater, u *url.URL, pubKeys ...[]byte)

func MakeKeyBook

func MakeKeyBook(t testing.TB, db database.Updater, u *url.URL, pubKeys ...[]byte)

func MakeKeyPage

func MakeKeyPage(t testing.TB, db database.Updater, book *url.URL, pubKeys ...[]byte)

func MakeLiteTokenAccount

func MakeLiteTokenAccount(t testing.TB, db database.Updater, pubKey []byte, token *url.URL) *url.URL

func MustBuild

func MustBuild(t testing.TB, b interface {
	Done() (*messaging.Envelope, error)
}) *messaging.Envelope

func MustBuildDeliveryV1 added in v1.2.0

func MustBuildDeliveryV1(t testing.TB, b interface {
	Done() (*messaging.Envelope, error)
}) *chain.Delivery

func MustGet0 added in v1.1.0

func MustGet0[T any](t testing.TB, fn func() (T, error)) T

func MustGet1 added in v1.1.0

func MustGet1[T, A1 any](t testing.TB, fn func(A1) (T, error), a1 A1) T

func PutAccount

func PutAccount(t testing.TB, db database.Updater, account protocol.Account)

PutAccount writes the account's main state.

func TryMakeAccount

func TryMakeAccount(t testing.TB, db database.Updater, account ...protocol.Account) error

TryMakeAccount writes the account's main state, adds a directory entry to the parent, and inherits the parent's authority if non is specified.

func Update

func Update(t testing.TB, db database.Updater, fn func(batch *database.Batch))

func UpdateAccount

func UpdateAccount[T protocol.Account](t testing.TB, db database.Updater, account *url.URL, fn func(T))

func View

func View(t testing.TB, db database.Viewer, fn func(batch *database.Batch))

Types

This section is empty.

Jump to

Keyboard shortcuts

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