wallet

package
v1.15.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0, MIT Imports: 9 Imported by: 24

Documentation

Overview

Code generated by github.com/filecoin-project/venus/venus-devtool/api-gen. DO NOT EDIT.

Code generated by github.com/filecoin-project/venus/venus-devtool/api-gen. DO NOT EDIT.

Index

Constants

View Source
const APINamespace = "wallet.IFullAPI"
View Source
const MajorVersion = 0
View Source
const MethodNamespace = "Filecoin"

Variables

This section is empty.

Functions

This section is empty.

Types

type ICommon

type ICommon interface {
	// Auth
	AuthVerify(ctx context.Context, token string) ([]auth.Permission, error) //perm:read
	AuthNew(ctx context.Context, perms []auth.Permission) ([]byte, error)    //perm:admin

	LogList(context.Context) ([]string, error)         //perm:read
	LogSetLevel(context.Context, string, string) error //perm:write

	ListSignedRecord(ctx context.Context, param *types.QuerySignRecordParams) ([]types.SignRecord, error) //perm:read

	api.Version
}

type ICommonStruct

type ICommonStruct struct {
	Internal struct {
		AuthNew          func(ctx context.Context, perms []auth.Permission) ([]byte, error)                        `perm:"admin"`
		AuthVerify       func(ctx context.Context, token string) ([]auth.Permission, error)                        `perm:"read"`
		ListSignedRecord func(ctx context.Context, param *types.QuerySignRecordParams) ([]types.SignRecord, error) `perm:"read"`
		LogList          func(context.Context) ([]string, error)                                                   `perm:"read"`
		LogSetLevel      func(context.Context, string, string) error                                               `perm:"write"`
		Version          func(ctx context.Context) (types.Version, error)                                          `perm:"read"`
	}
}

func (*ICommonStruct) AuthNew

func (s *ICommonStruct) AuthNew(p0 context.Context, p1 []auth.Permission) ([]byte, error)

func (*ICommonStruct) AuthVerify

func (s *ICommonStruct) AuthVerify(p0 context.Context, p1 string) ([]auth.Permission, error)

func (*ICommonStruct) ListSignedRecord added in v1.11.0

func (s *ICommonStruct) ListSignedRecord(p0 context.Context, p1 *types.QuerySignRecordParams) ([]types.SignRecord, error)

func (*ICommonStruct) LogList

func (s *ICommonStruct) LogList(p0 context.Context) ([]string, error)

func (*ICommonStruct) LogSetLevel

func (s *ICommonStruct) LogSetLevel(p0 context.Context, p1 string, p2 string) error

func (*ICommonStruct) Version

func (s *ICommonStruct) Version(p0 context.Context) (types.Version, error)

type IFullAPI

type IFullAPI interface {
	ILocalWallet
	ICommon
	IWalletEvent
}

func DialIFullAPIRPC added in v1.2.2

func DialIFullAPIRPC(ctx context.Context, addr string, token string, requestHeader http.Header, opts ...jsonrpc.Option) (IFullAPI, jsonrpc.ClientCloser, error)

DialIFullAPIRPC is a more convinient way of building client, as it resolves any format (url, multiaddr) of addr string.

func NewIFullAPIRPC

func NewIFullAPIRPC(ctx context.Context, addr string, requestHeader http.Header, opts ...jsonrpc.Option) (IFullAPI, jsonrpc.ClientCloser, error)

NewIFullAPIRPC creates a new httpparse jsonrpc remotecli.

type ILocalWallet

type ILocalWallet interface {
	IWallet
	IWalletLock
}

type ILocalWalletStruct

type ILocalWalletStruct struct {
	IWalletStruct
	IWalletLockStruct
}

type IWallet

type IWallet interface {
	WalletNew(ctx context.Context, kt types.KeyType) (address.Address, error)                                             //perm:admin
	WalletHas(ctx context.Context, address address.Address) (bool, error)                                                 //perm:read
	WalletList(ctx context.Context) ([]address.Address, error)                                                            //perm:read
	WalletSign(ctx context.Context, signer address.Address, toSign []byte, meta types.MsgMeta) (*crypto.Signature, error) //perm:sign
	WalletExport(ctx context.Context, addr address.Address) (*types.KeyInfo, error)                                       //perm:admin
	WalletImport(ctx context.Context, ki *types.KeyInfo) (address.Address, error)                                         //perm:admin
	WalletDelete(ctx context.Context, addr address.Address) error                                                         //perm:admin
}

type IWalletEvent

type IWalletEvent interface {
	AddSupportAccount(ctx context.Context, supportAccount string) error  //perm:admin
	AddNewAddress(ctx context.Context, newAddrs []address.Address) error //perm:admin
}

type IWalletEventStruct

type IWalletEventStruct struct {
	Internal struct {
		AddNewAddress     func(ctx context.Context, newAddrs []address.Address) error `perm:"admin"`
		AddSupportAccount func(ctx context.Context, supportAccount string) error      `perm:"admin"`
	}
}

func (*IWalletEventStruct) AddNewAddress

func (s *IWalletEventStruct) AddNewAddress(p0 context.Context, p1 []address.Address) error

func (*IWalletEventStruct) AddSupportAccount

func (s *IWalletEventStruct) AddSupportAccount(p0 context.Context, p1 string) error

type IWalletLock

type IWalletLock interface {
	// SetPassword do it first after program setup
	SetPassword(ctx context.Context, password string) error //perm:admin
	// unlock the wallet and enable IWallet logic
	Unlock(ctx context.Context, password string) error //perm:admin
	// lock the wallet and disable IWallet logic
	Lock(ctx context.Context, password string) error //perm:admin
	// show lock state
	LockState(ctx context.Context) bool //perm:admin
	// VerifyPassword verify that the passwords are consistent
	VerifyPassword(ctx context.Context, password string) error //perm:admin
}

type IWalletLockStruct

type IWalletLockStruct struct {
	Internal struct {
		Lock           func(ctx context.Context, password string) error `perm:"admin"`
		LockState      func(ctx context.Context) bool                   `perm:"admin"`
		SetPassword    func(ctx context.Context, password string) error `perm:"admin"`
		Unlock         func(ctx context.Context, password string) error `perm:"admin"`
		VerifyPassword func(ctx context.Context, password string) error `perm:"admin"`
	}
}

func (*IWalletLockStruct) Lock

func (s *IWalletLockStruct) Lock(p0 context.Context, p1 string) error

func (*IWalletLockStruct) LockState

func (s *IWalletLockStruct) LockState(p0 context.Context) bool

func (*IWalletLockStruct) SetPassword

func (s *IWalletLockStruct) SetPassword(p0 context.Context, p1 string) error

func (*IWalletLockStruct) Unlock

func (s *IWalletLockStruct) Unlock(p0 context.Context, p1 string) error

func (*IWalletLockStruct) VerifyPassword

func (s *IWalletLockStruct) VerifyPassword(p0 context.Context, p1 string) error

type IWalletStruct

type IWalletStruct struct {
	Internal struct {
		WalletDelete func(ctx context.Context, addr address.Address) error                                                           `perm:"admin"`
		WalletExport func(ctx context.Context, addr address.Address) (*types.KeyInfo, error)                                         `perm:"admin"`
		WalletHas    func(ctx context.Context, address address.Address) (bool, error)                                                `perm:"read"`
		WalletImport func(ctx context.Context, ki *types.KeyInfo) (address.Address, error)                                           `perm:"admin"`
		WalletList   func(ctx context.Context) ([]address.Address, error)                                                            `perm:"read"`
		WalletNew    func(ctx context.Context, kt types.KeyType) (address.Address, error)                                            `perm:"admin"`
		WalletSign   func(ctx context.Context, signer address.Address, toSign []byte, meta types.MsgMeta) (*crypto.Signature, error) `perm:"sign"`
	}
}

func (*IWalletStruct) WalletDelete

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

func (*IWalletStruct) WalletExport

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

func (*IWalletStruct) WalletHas

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

func (*IWalletStruct) WalletImport

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

func (*IWalletStruct) WalletList

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

func (*IWalletStruct) WalletNew

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

func (*IWalletStruct) WalletSign

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

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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