Documentation ¶
Index ¶
- Constants
- func InitTxRouterWithWallet(r util.TxRouter, wallet Wallet)
- type Account
- func (s *Account) Create(rw web.ResponseWriter, req *web.Request)
- func (s *Account) Delete(rw web.ResponseWriter, req *web.Request)
- func (s *Account) ExportKey(rw web.ResponseWriter, req *web.Request)
- func (s *Account) ImportKey(rw web.ResponseWriter, req *web.Request)
- func (s *Account) List(rw web.ResponseWriter, req *web.Request)
- func (s *Account) LoadPrivKey() (crypto.Signer, error)
- func (s *Account) ParseParameters(rw web.ResponseWriter, req *web.Request, next web.NextMiddlewareFunc)
- func (s *Account) PublicKeyToAddress(rw web.ResponseWriter, req *web.Request)
- func (s *Account) Query(rw web.ResponseWriter, req *web.Request)
- func (s *Account) QueryChild(rw web.ResponseWriter, req *web.Request)
- func (s *Account) SetPersistFlag(f bool)
- func (s *Account) Update(rw web.ResponseWriter, req *web.Request)
- type AccountRouter
- type Wallet
Constants ¶
View Source
const ( AccountID = "accountID" AccountIndex = "index" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Account ¶
type Account struct { *util.FabricClientBase // contains filtered or unexported fields }
func (*Account) ParseParameters ¶
func (s *Account) ParseParameters(rw web.ResponseWriter, req *web.Request, next web.NextMiddlewareFunc)
type AccountRouter ¶
func CreateAccountRouter ¶
func CreateAccountRouter(root *web.Router, path string) AccountRouter
func (AccountRouter) BuildPrivkeyRoutes ¶
func (r AccountRouter) BuildPrivkeyRoutes()
func (AccountRouter) BuildRoutes ¶
func (r AccountRouter) BuildRoutes()
func (AccountRouter) Init ¶
func (r AccountRouter) Init(wallet Wallet) AccountRouter
type Wallet ¶
type Wallet interface { // Create private key // NewPrivKey(accountID string) (*abcrypto.PrivateKey, error) NewPrivKey(accountID string) (abcrypto.Signer, error) // Import private key ImportPrivKey(accountID string, privkey string) error // Import private key // ImportPrivateKey(accountID string, privkey *abcrypto.PrivateKey) error ImportPrivateKey(accountID string, privkey abcrypto.Signer) error // Load private key // LoadPrivKey(accountID string) (*abcrypto.PrivateKey, error) LoadPrivKey(accountID string) (abcrypto.Signer, error) // Remove private key RemovePrivKey(accountID string) error // Rename account id Rename(old string, new string) error // List all private keys // ListAll() (map[string]*abcrypto.PrivateKey, error) ListAll() (map[string]abcrypto.Signer, error) // Read private keys from file Load() error // Write private keys to file Persist() error }
Click to show internal directories.
Click to hide internal directories.