mock

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0, UNKNOWN, UNKNOWN not legal advice Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Package = amino.RegisterPackage(amino.NewPackage(
	"github.com/gnolang/gno/tm2/pkg/crypto/mock",
	"tm",
	amino.GetCallersDirname(),
).WithDependencies().WithTypes(
	PubKeyMock{}, "PubKeyMock",
	PrivKeyMock{}, "PrivKeyMock",
))

Functions

This section is empty.

Types

type PrivKeyMock

type PrivKeyMock []byte

PrivKeyMock implements crypto.PrivKey.

func GenPrivKey

func GenPrivKey() PrivKeyMock

func (PrivKeyMock) Bytes

func (privKey PrivKeyMock) Bytes() []byte

Bytes marshals the privkey using amino encoding w/ type information.

func (PrivKeyMock) Equals

func (privKey PrivKeyMock) Equals(other crypto.PrivKey) bool

func (PrivKeyMock) PubKey

func (privKey PrivKeyMock) PubKey() crypto.PubKey

func (PrivKeyMock) Sign

func (privKey PrivKeyMock) Sign(msg []byte) ([]byte, error)

Make a fake signature. Its length is variable.

type PubKeyMock

type PubKeyMock []byte

func (PubKeyMock) Address

func (pubKey PubKeyMock) Address() crypto.Address

Returns address w/ pubkey as suffix (for debugging).

func (PubKeyMock) Bytes

func (pubKey PubKeyMock) Bytes() []byte

Bytes marshals the PubKey using amino encoding.

func (PubKeyMock) Equals

func (pubKey PubKeyMock) Equals(other crypto.PubKey) bool

func (PubKeyMock) String

func (pubKey PubKeyMock) String() string

func (PubKeyMock) VerifyBytes

func (pubKey PubKeyMock) VerifyBytes(msg []byte, sig []byte) bool

Jump to

Keyboard shortcuts

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