smartaccount

package
v0.9.3 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WasmPath1 = "../../tests/smartaccount/wasm/"
	WasmPath2 = "../../../tests/smartaccount/wasm/"
)

Variables

View Source
var (
	UserAddr     = "cosmos1lg0g3jpu8luawwezcknamz0l003swknjyw9uch"
	GenesisState = &typesv1.GenesisState{
		Params:         typesv1.NewParams([]*typesv1.CodeID{{CodeID: 1, Status: true}}, []string(nil), typesv1.DefaultMaxGas),
		SmartAccountId: typesv1.DefaultSmartAccountId,
	}
)
View Source
var (
	DefaultSalt     = []byte("test")
	DefaultMsg      = []byte("{}")
	DefaultCodeID   = uint64(1)
	DefaultPubKey   = []byte("{\"@type\":\"/cosmos.crypto.secp256k1.PubKey\",\"key\":\"AnZfdXVALfIcNjpqgzH/4nWsSpP7l5PiCyZAuAWQRBUz\"}")
	DefaultRPubKery = []byte("{\"@type\":\"/cosmos.crypto.secp256k1.PubKey\",\"key\":\"A/2t0ru/iZ4HoiX0DkTuMy9rC2mMeXmiN6luM3pa+IvT\"}")
)

Functions

func AddNewBaseAccount

func AddNewBaseAccount(app *app.App, ctx sdk.Context, addr string, pubKey cryptotypes.PubKey, sequence uint64) error

func AddNewSmartAccount

func AddNewSmartAccount(app *app.App, ctx sdk.Context, addr string, pubKey cryptotypes.PubKey, sequence uint64) error

func GenerateInActivateAccount

func GenerateInActivateAccount(
	app *app.App,
	ctx sdk.Context,
	dPubKey []byte,
	dCodeID uint64,
	dSalt []byte,
	dMsg []byte,
) (*authtypes.BaseAccount, *codectypes.Any, error)

func NewBaseAccount

func NewBaseAccount(app *app.App, ctx sdk.Context, addr string, pubKey cryptotypes.PubKey, sequence uint64) (*authtypes.BaseAccount, error)

func SetupGenesisTest

func SetupGenesisTest(t *testing.T) (sdk.Context, *app.App)

func StoreCodeID

func StoreCodeID(app *app.App, ctx sdk.Context, creator sdk.AccAddress, path string) (uint64, []byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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