rpcassert

package
v0.7.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchSupplyCommitRPC

FetchSupplyCommitRPC calls the FetchSupplyCommit RPC and asserts that the returned response matches the given predicate. If the predicate is nil, only basic checks are performed (non-nil response).

If the assertion fails, the test is failed.

func ListAssetsRPC

func ListAssetsRPC(t *testing.T, ctx context.Context,
	client taprpc.TaprootAssetsClient,
	assertPredicate func(*taprpc.ListAssetResponse) error,
	req *taprpc.ListAssetRequest) *taprpc.ListAssetResponse

ListAssetsRPC calls ListAssets RPC with the given request until the given assertion predicate returns no error or the timeout is reached. If the predicate is nil, only basic checks are performed (non-nil response).

If the assertion fails, the test is failed.

func ListBalancesRPC

ListBalancesRPC calls ListBalances RPC with the given request until the given assertion predicate returns no error or the timeout is reached. If the predicate is nil, only basic checks are performed (non-nil response).

If the assertion fails, the test is failed.

func ListUtxosRPC

func ListUtxosRPC(t *testing.T, ctx context.Context,
	client taprpc.TaprootAssetsClient,
	assertPredicate func(*taprpc.ListUtxosResponse) error,
	req *taprpc.ListUtxosRequest) *taprpc.ListUtxosResponse

ListUtxosRPC calls ListUtxos RPC with the given request until the given assertion predicate returns no error or the timeout is reached. If the predicate is nil, only basic checks are performed (non-nil response).

If the assertion fails, the test is failed.

func NewAddrRPC

func NewAddrRPC(t *testing.T, ctx context.Context,
	client taprpc.TaprootAssetsClient,
	assertPredicate func(*taprpc.Addr) error,
	req *taprpc.NewAddrRequest) *taprpc.Addr

NewAddrRPC calls the NewAddr RPC and asserts that the returned address matches the given predicate. If the predicate is nil, only basic checks are performed (non-nil response).

If the assertion fails, the test is failed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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