lotus/api/api_wallet.go

22 lines
814 B
Go
Raw Normal View History

2020-09-05 19:36:32 +00:00
package api
2020-09-04 20:17:28 +00:00
import (
"context"
"github.com/filecoin-project/go-address"
"github.com/filecoin-project/lotus/chain/types"
"github.com/filecoin-project/specs-actors/actors/crypto"
)
2020-09-05 19:36:32 +00:00
type WalletAPI interface {
2020-09-04 20:17:28 +00:00
WalletNew(context.Context, crypto.SigType) (address.Address, error)
WalletHas(context.Context, address.Address) (bool, error)
WalletList(context.Context) ([]address.Address, error)
WalletSign(context.Context, address.Address, []byte) (*crypto.Signature, error)
// nonce keeping done by wallet app
WalletSignMessage(context.Context, address.Address, *types.Message) (*types.SignedMessage, error)
WalletExport(context.Context, address.Address) (*types.KeyInfo, error)
WalletImport(context.Context, *types.KeyInfo) (address.Address, error)
WalletDelete(context.Context, address.Address) error
}