Versions in this module Expand all Collapse all v0 v0.1.0 Mar 17, 2026 Changes in this version + const KNamePrefix + const WalletRepo + var ErrKeyInfoNotFound = fmt.Errorf("key info not found") + func Balance(ctx context.Context, client *ethclient.Client, addr string) (string, error) + func BalanceNumber(client *ethclient.Client, addr string) (float64, error) + func Sign(privatekey string, msg []byte) ([]byte, error) + func ToPublic(priv string) (string, *ecdsa.PublicKey, error) + func Verify(addr string, signature, dataHash []byte) (bool, error) + type DiskKeyStore struct + func OpenOrInitKeystore(p string) (*DiskKeyStore, error) + func (dks *DiskKeyStore) Close() error + func (dks *DiskKeyStore) Delete(key string) error + func (dks *DiskKeyStore) Get(name string) (KeyInfo, error) + func (dks *DiskKeyStore) List() ([]string, error) + func (dks *DiskKeyStore) Put(key string, info KeyInfo) error + type KeyInfo struct + PrivateKey string + type KeyStore interface + Close func() error + Delete func(string) error + Get func(string) (KeyInfo, error) + List func() ([]string, error) + Put func(string, KeyInfo) error + type LocalWallet struct + func NewWallet(keystore *DiskKeyStore) *LocalWallet + func SetupWallet(dir string) (*LocalWallet, error) + func (w *LocalWallet) CollateralSend(ctx context.Context, from, to string, amount string) (string, error) + func (w *LocalWallet) CollateralWithdraw(ctx context.Context, address string, amount string, cpAccountAddress string, ...) (string, error) + func (w *LocalWallet) CollateralWithdrawConfirm(ctx context.Context, address string, cpAccountAddress string, ...) (string, error) + func (w *LocalWallet) CollateralWithdrawRequest(ctx context.Context, address string, amount string, cpAccountAddress string, ...) (string, error) + func (w *LocalWallet) CollateralWithdrawView(ctx context.Context, cpAccountAddress string, withdrawType string) (models.WithdrawRequest, error) + func (w *LocalWallet) CollateralWithdrawWithUbiZero(ctx context.Context, address string, amount string, cpAccountAddress string, ...) (string, error) + func (w *LocalWallet) FindKey(addr string) (*KeyInfo, error) + func (w *LocalWallet) SequencerDeposit(ctx context.Context, from string, amount string, cpAccountAddress string) (string, error) + func (w *LocalWallet) SequencerWithdraw(ctx context.Context, address string, amount string, cpAccountAddress string) (string, error) + func (w *LocalWallet) WalletCollateral(ctx context.Context, from string, amount string, cpAccountAddress string, ...) (string, error) + func (w *LocalWallet) WalletDelete(ctx context.Context, addr string) error + func (w *LocalWallet) WalletExport(ctx context.Context, addr string) (*KeyInfo, error) + func (w *LocalWallet) WalletImport(ctx context.Context, ki *KeyInfo) (string, error) + func (w *LocalWallet) WalletList(ctx context.Context, contractFlag bool) error + func (w *LocalWallet) WalletNew(ctx context.Context) (string, error) + func (w *LocalWallet) WalletSend(ctx context.Context, from, to string, amount string, nonce uint64) (string, error) + func (w *LocalWallet) WalletSign(ctx context.Context, addr string, msg []byte) (string, error) + func (w *LocalWallet) WalletVerify(ctx context.Context, addr string, sigByte []byte, data string) (bool, error) + type Signature struct + Data []byte