Documentation ¶
Index ¶
- Variables
- func Cipher(src []byte, Password string) ([]byte, error)
- func Decipher(cipherText []byte, Password string) ([]byte, error)
- type Bank
- func (s *Bank) Accounts(name string) ([]common.Address, error)
- func (s *Bank) ChangePassword(name string, oldPassword string, Password string) error
- func (s *Bank) CheckPassword(name string, Password string) error
- func (s *Bank) CreateKey(name string, Password string) error
- func (s *Bank) DeleteKey(name string, Password string) error
- func (s *Bank) ImportKey(name string, bs []byte, Password string) error
- func (s *Bank) Init(pm types.ProcessManager, cn types.Provider) error
- func (s *Bank) InitFromStore(st *chain.Store) error
- func (s *Bank) KeyNames() ([]string, error)
- func (s *Bank) Name() string
- func (s *Bank) NameByAddress(addr common.Address) (string, error)
- func (s *Bank) OnBlockConnected(b *types.Block, events []types.Event, loader types.Loader)
- func (s *Bank) OnLoadChain(loader types.Loader) error
- func (s *Bank) SendTx(tx types.Transaction, sigs []common.Signature) (hash.Hash256, error)
- func (s *Bank) SetNode(nd *p2p.Node)
- func (s *Bank) Sign(name string, Password string, MessageHash hash.Hash256) (common.Signature, error)
- func (s *Bank) Unstaking(HyperAddr common.Address, addr common.Address, UnstakedHeight uint32) *amount.Amount
- func (s *Bank) WaitTx(TxHash hash.Hash256, wait time.Duration) (string, error)
- type Transaction
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrExistKeyName = errors.New("exist key name") ErrInvalidTag = errors.New("invalid key tag") ErrInvalidNameAddress = errors.New("invalid name address") ErrInvalidTransactionHash = errors.New("invalid transaction hash") ErrInvalidTXID = errors.New("invalid txid") ErrTransactionTimeout = errors.New("transaction timeout") ErrTransactionFailed = errors.New("transaction failed") )
errors
Functions ¶
Types ¶
type Bank ¶
func NewBank ¶
func NewBank(keyStore backend.StoreBackend, dbpath string) *Bank
NewBank returns a Bank
func (*Bank) ChangePassword ¶
ChangePassword changes the password of the key
func (*Bank) CheckPassword ¶
CheckPassword checks the password of the key
func (*Bank) InitFromStore ¶
InitFromStore initializes account datas from the store
func (*Bank) NameByAddress ¶
NameByAddress returns the name of the address from the wallet
func (*Bank) OnBlockConnected ¶
OnBlockConnected called when a block is connected to the chain
func (*Bank) OnLoadChain ¶
OnLoadChain called when the chain loaded
func (*Bank) Sign ¶
func (s *Bank) Sign(name string, Password string, MessageHash hash.Hash256) (common.Signature, error)
Sign makes a signature of the message using the private key of the name
type Transaction ¶
Click to show internal directories.
Click to hide internal directories.