Documentation ¶
Index ¶
- Constants
- func DefaultAuthMW(next http.Handler) http.Handler
- func GetCSRFToken(r *http.Request) (string, error)
- func HandleCORSMW(next http.Handler) http.Handler
- func LoginRequiredMW(next http.Handler) http.Handler
- func MustGetKBPassphraseFromSession(r *http.Request) string
- func OTPRequiredMW(next http.HandlerFunc) http.HandlerFunc
- func ProtectCSRFMW(skipRoutes []string) mux.MiddlewareFunc
- func ReadN(n int) []byte
- func ReadStr32() string
- func ReadStrN(byteLen int) string
- func RegisterRoutes(ctx context.CLIContext, r *mux.Router, cdc *codec.Codec)
- func ReplaceKB(name string, passphrase string, pk crypto.PrivKey) string
- type Keybase
- func (*Keybase) CloseDB()
- func (*Keybase) CreateAccount(name, mnemonic, bip39Passwd, encryptPasswd string, account uint32, ...) (keys.Info, error)
- func (k *Keybase) CreateLedger(name string, algo keys.SigningAlgo, hrp string, account, index uint32) (info keys.Info, err error)
- func (*Keybase) CreateMnemonic(name string, language keys.Language, passwd string, algo keys.SigningAlgo) (info keys.Info, seed string, err error)
- func (*Keybase) CreateMulti(name string, pubkey crypto.PubKey) (info keys.Info, err error)
- func (*Keybase) CreateOffline(name string, pubkey crypto.PubKey) (info keys.Info, err error)
- func (*Keybase) Delete(name, passphrase string, skipPass bool) error
- func (*Keybase) Derive(name, mnemonic, bip39Passwd, encryptPasswd string, params hd.BIP44Params) (keys.Info, error)
- func (*Keybase) Export(name string) (armor string, err error)
- func (k *Keybase) ExportPrivKey(name, decryptPassphrase, encryptPassphrase string) (armor string, err error)
- func (*Keybase) ExportPrivateKeyObject(name string, passphrase string) (crypto.PrivKey, error)
- func (*Keybase) ExportPubKey(name string) (armor string, err error)
- func (*Keybase) Get(name string) (keys.Info, error)
- func (k *Keybase) GetAddr() sdk.AccAddress
- func (*Keybase) GetByAddress(address types.AccAddress) (keys.Info, error)
- func (k *Keybase) GetName() string
- func (*Keybase) Import(name string, armor string) (err error)
- func (k *Keybase) ImportPrivKey(name, armor, passphrase string) error
- func (*Keybase) ImportPubKey(name string, armor string) (err error)
- func (*Keybase) List() ([]keys.Info, error)
- func (k *Keybase) Sign(name string, passphrase string, msg []byte) ([]byte, crypto.PubKey, error)
- func (*Keybase) Update(name, oldpass string, getNewpass func() (string, error)) error
- type LoginRequest
- type MeResponse
Constants ¶
View Source
const (
AccountName = "zafx"
)
Variables ¶
This section is empty.
Functions ¶
func OTPRequiredMW ¶
func OTPRequiredMW(next http.HandlerFunc) http.HandlerFunc
func ProtectCSRFMW ¶
func ProtectCSRFMW(skipRoutes []string) mux.MiddlewareFunc
func RegisterRoutes ¶
Types ¶
type Keybase ¶
type Keybase struct {
// contains filtered or unexported fields
}
func MustGetKBFromSession ¶
func (*Keybase) CreateAccount ¶
func (*Keybase) CreateLedger ¶
func (*Keybase) CreateMnemonic ¶
func (*Keybase) CreateMulti ¶
func (*Keybase) CreateOffline ¶
func (*Keybase) ExportPrivKey ¶
func (*Keybase) ExportPrivateKeyObject ¶
func (*Keybase) GetAddr ¶
func (k *Keybase) GetAddr() sdk.AccAddress
func (*Keybase) GetByAddress ¶
func (*Keybase) ImportPrivKey ¶
type LoginRequest ¶
type MeResponse ¶
type MeResponse struct {
Address string `json:"address"`
}
Click to show internal directories.
Click to hide internal directories.