testutil

package
v3.0.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

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
	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,
	n uint64,
	threshold uint64,
) (*GroupContext, error)

func NewGroupContext

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

func (*GroupContext) GenerateDE

func (g *GroupContext) GenerateDE(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