testutil

package
v3.1.6 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2026 License: GPL-3.0 Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package testutil is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateAccounts

func GenerateAccounts(n uint64) []bandtesting.Account

func GenerateSignature

func GenerateSignature(
	signing types.Signing,
	assignedMembers types.AssignedMembers,
	memberID tss.MemberID,
	de DEWithPrivateNonce,
	privKey tss.Scalar,
) (tss.Signature, error)

Types

type DEWithPrivateNonce

type DEWithPrivateNonce struct {
	PubDE types.DE
	PrivD tss.Scalar
	PrivE tss.Scalar
}

DEWithPrivateNonce represents private value (D, E) used in tss signing process.

func GenerateDE

func GenerateDE(secret tss.Scalar) DEWithPrivateNonce

type GroupContext

type GroupContext struct {
	GroupID               tss.GroupID
	Threshold             uint64
	Accounts              []bandtesting.Account
	Round1Infos           []tss.Round1Info
	EncryptedSecretShares []tss.EncSecretShares
	OwnPubKeySigs         []tss.Signature
	OwnPrivKeys           []tss.Scalar
	Secrets               []tss.Scalar
	DEs                   [][]DEWithPrivateNonce
}

func CompleteGroupCreation

func CompleteGroupCreation(
	ctx sdk.Context,
	k *tsskeeper.Keeper,
	groupSize uint64,
	threshold uint64,
) (*GroupContext, error)

func NewGroupContext

func NewGroupContext(
	accounts []bandtesting.Account,
	groupID tss.GroupID,
	threshold uint64,
	dkgContext []byte,
) (*GroupContext, error)

func (*GroupContext) FillDEs

func (g *GroupContext) FillDEs(ctx sdk.Context, k *tsskeeper.Keeper) error

func (*GroupContext) PopDE

func (g *GroupContext) PopDE(id int, pubD tss.Point, pubE tss.Point) (DEWithPrivateNonce, error)

func (*GroupContext) SubmitRound1

func (g *GroupContext) SubmitRound1(ctx sdk.Context, k *tsskeeper.Keeper) error

func (*GroupContext) SubmitRound2

func (g *GroupContext) SubmitRound2(ctx sdk.Context, k *tsskeeper.Keeper) error

func (*GroupContext) SubmitRound3

func (g *GroupContext) SubmitRound3(ctx sdk.Context, k *tsskeeper.Keeper) error

func (*GroupContext) SubmitSignature

func (g *GroupContext) SubmitSignature(
	ctx sdk.Context,
	k *tsskeeper.Keeper,
	msgServer types.MsgServer,
	signingID tss.SigningID,
) error

type MockAuthzKeeper

type MockAuthzKeeper struct {
	// contains filtered or unexported fields
}

MockAuthzKeeper is a mock of AuthzKeeper interface.

func NewMockAuthzKeeper

func NewMockAuthzKeeper(ctrl *gomock.Controller) *MockAuthzKeeper

NewMockAuthzKeeper creates a new mock instance.

func (*MockAuthzKeeper) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAuthzKeeper) GetAuthorization

func (m *MockAuthzKeeper) GetAuthorization(ctx context.Context, grantee, granter types.AccAddress, msgType string) (authz.Authorization, *time.Time)

GetAuthorization mocks base method.

func (*MockAuthzKeeper) SaveGrant

func (m *MockAuthzKeeper) SaveGrant(ctx context.Context, grantee, granter types.AccAddress, authorization authz.Authorization, expiration *time.Time) error

SaveGrant mocks base method.

type MockAuthzKeeperMockRecorder

type MockAuthzKeeperMockRecorder struct {
	// contains filtered or unexported fields
}

MockAuthzKeeperMockRecorder is the mock recorder for MockAuthzKeeper.

func (*MockAuthzKeeperMockRecorder) GetAuthorization

func (mr *MockAuthzKeeperMockRecorder) GetAuthorization(ctx, grantee, granter, msgType any) *gomock.Call

GetAuthorization indicates an expected call of GetAuthorization.

func (*MockAuthzKeeperMockRecorder) SaveGrant

func (mr *MockAuthzKeeperMockRecorder) SaveGrant(ctx, grantee, granter, authorization, expiration any) *gomock.Call

SaveGrant indicates an expected call of SaveGrant.

type MockRollingseedKeeper

type MockRollingseedKeeper struct {
	// contains filtered or unexported fields
}

MockRollingseedKeeper is a mock of RollingseedKeeper interface.

func NewMockRollingseedKeeper

func NewMockRollingseedKeeper(ctrl *gomock.Controller) *MockRollingseedKeeper

NewMockRollingseedKeeper creates a new mock instance.

func (*MockRollingseedKeeper) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockRollingseedKeeper) GetRollingSeed

func (m *MockRollingseedKeeper) GetRollingSeed(ctx types.Context) []byte

GetRollingSeed mocks base method.

type MockRollingseedKeeperMockRecorder

type MockRollingseedKeeperMockRecorder struct {
	// contains filtered or unexported fields
}

MockRollingseedKeeperMockRecorder is the mock recorder for MockRollingseedKeeper.

func (*MockRollingseedKeeperMockRecorder) GetRollingSeed

func (mr *MockRollingseedKeeperMockRecorder) GetRollingSeed(ctx any) *gomock.Call

GetRollingSeed indicates an expected call of GetRollingSeed.

Jump to

Keyboard shortcuts

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