Versions in this module Expand all Collapse all v1 v1.0.1 Nov 21, 2023 Changes in this version type Response + func WasmStatus(datas ...string) *Response v1.0.0 Nov 6, 2023 Changes in this version + func FatalCheck(err error) + func GetCache(key string, bDelete bool, beforeDelleteFunc func(v interface{}) bool) interface + func LogDebugf(format string, datas ...interface{}) + func LogDebugln(datas ...interface{}) + func SetCache(key string, val interface{}, bForce bool) error + func SetCacheByTime(key string, val interface{}, bForce bool, timeout time.Duration, ...) error + func Str(data any) string + func Web2DataInit(wd2 *pkg.Web2Data, user *User, selfKey []byte) *pkg.Web2Data + func Web2DecryptWebAuthnKey(user *User, selfKey []byte) (string, error) + func Web2EncryptWeb2Data(wd2 *pkg.Web2Data) (string, error) + func WebError(err error, webErr string) string + type Response struct + Data interface{} + Error string + func WasmAuthorizeCode(datas ...string) *Response + func WasmHandle(datas ...string) *Response + func WasmInit(datas ...string) *Response + func WasmPublic(datas ...string) *Response + func WasmRegister(datas ...string) *Response + func WasmVerify(datas ...string) *Response + type SelfData struct + type User struct + RecoverID3 string + RelateTimes int + RelateVerifyParams [][]byte + SelfData *SelfData + SelfKey3 string + SelfPrivate3 string + Web2PublicKey *ecdsa.PublicKey + Web3PublicKey *ecdsa.PublicKey + func GetUser(userID string) *User + func NewUser(userID string, sd *pkg.Web2Data) (*User, error) + func (p *User) GetTOTPKey(selfPrivate *ecdsa.PrivateKey) (string, error) + func (p *User) HandleAssociatedVerify(action, relateTimes string, selfPrivate *ecdsa.PrivateKey) (any, error) + func (p *User) InitTOTPKey(selfPrivate *ecdsa.PrivateKey) (string, []byte, error) + func (p *User) InitWeb3User(recoverID string, wd2 *pkg.Web2Data) (*Web3User, string, *ecdsa.PrivateKey, error) + func (p *User) Load() ([]byte, *ecdsa.PrivateKey, error) + func (p *User) PackSigAndMerkleLeaves(action string, selfPrivate *ecdsa.PrivateKey) (any, error) + func (p *User) Register(recoverID string) (*Web3User, error) + func (p *User) ResetSelfKey(kind, random, web2Key string, selfPrivate *ecdsa.PrivateKey) (any, error) + func (p *User) ResetTOTPKey(recoverID, encryptedRecoverID string, selfPrivate *ecdsa.PrivateKey) (any, error) + func (p *User) VerifyTOTP(code string) error + type Web3User struct + QRCode string + RecoverID string + SelfAddress string + SelfKey string + SelfPrivate string + Web2Data string + type Worker struct + func Init() *Worker