api

package
v0.0.0-...-8791696 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PermRead  auth.Permission = "read" // default
	PermWrite auth.Permission = "write"
	PermSign  auth.Permission = "sign"  // Use wallet keys for signing
	PermAdmin auth.Permission = "admin" // Manage permissions
)

Variables

View Source
var DefaultPerms = []auth.Permission{PermRead}

Functions

func PermissionedWalletAPI

func PermissionedWalletAPI(a lapi.Wallet) lapi.Wallet

Types

type WalletStruct

type WalletStruct struct {
	Internal struct {
		WalletDelete func(p0 context.Context, p1 address.Address) error                                                 `perm:"admin"`
		WalletExport func(p0 context.Context, p1 address.Address) (*types.KeyInfo, error)                               `perm:"admin"`
		WalletHas    func(p0 context.Context, p1 address.Address) (bool, error)                                         `perm:"read"`
		WalletImport func(p0 context.Context, p1 *types.KeyInfo) (address.Address, error)                               `perm:"write"`
		WalletList   func(p0 context.Context) ([]address.Address, error)                                                `perm:"read"`
		WalletNew    func(p0 context.Context, p1 types.KeyType) (address.Address, error)                                `perm:"write"`
		WalletSign   func(p0 context.Context, p1 address.Address, p2 []byte, p3 api.MsgMeta) (*crypto.Signature, error) `perm:"sign"`
	}
}

func (*WalletStruct) WalletDelete

func (s *WalletStruct) WalletDelete(p0 context.Context, p1 address.Address) error

func (*WalletStruct) WalletExport

func (s *WalletStruct) WalletExport(p0 context.Context, p1 address.Address) (*types.KeyInfo, error)

func (*WalletStruct) WalletHas

func (s *WalletStruct) WalletHas(p0 context.Context, p1 address.Address) (bool, error)

func (*WalletStruct) WalletImport

func (s *WalletStruct) WalletImport(p0 context.Context, p1 *types.KeyInfo) (address.Address, error)

func (*WalletStruct) WalletList

func (s *WalletStruct) WalletList(p0 context.Context) ([]address.Address, error)

func (*WalletStruct) WalletNew

func (s *WalletStruct) WalletNew(p0 context.Context, p1 types.KeyType) (address.Address, error)

func (*WalletStruct) WalletSign

func (s *WalletStruct) WalletSign(p0 context.Context, p1 address.Address, p2 []byte, p3 api.MsgMeta) (*crypto.Signature, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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