Documentation ¶
Index ¶
- Variables
- func ByteToHex(data []byte) string
- func GenMnemonic() (string, error)
- func HexToByte(hex string) ([]byte, error)
- func IsValidMnemonic(mnemonic string) bool
- type Wallet
- func (w *Wallet) CheckPassword(password string) (bool, error)
- func (w *Wallet) GetAddress(network int) (string, error)deprecated
- func (w *Wallet) GetOrCreateBitcoinAccount(chainnet string) (*btc.Account, error)
- func (w *Wallet) GetOrCreateCosmosAccount() (*cosmos.Account, error)
- func (w *Wallet) GetOrCreateCosmosTypeAccount(cointype int64, addressPrefix string) (*cosmos.Account, error)
- func (w *Wallet) GetOrCreateDogeAccount(chainnet string) (*doge.Account, error)
- func (w *Wallet) GetOrCreateEthereumAccount() (*eth.Account, error)
- func (w *Wallet) GetOrCreatePolkaAccount(network int) (*polka.Account, error)
- func (w *Wallet) GetOrCreateSolanaAccount() (*solana.Account, error)
- func (w *Wallet) GetPrivateKeyHex() (string, error)deprecated
- func (w *Wallet) GetPublicKey() ([]byte, error)deprecated
- func (w *Wallet) GetPublicKeyHex() (string, error)deprecated
- func (w *Wallet) Sign(message []byte, password string) (b []byte, err error)deprecated
- func (w *Wallet) SignFromHex(messageHex string, password string) ([]byte, error)deprecated
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidMnemonic = errors.New("invalid mnemonic")
)
Functions ¶
func GenMnemonic ¶
func IsValidMnemonic ¶ added in v0.2.0
Types ¶
type Wallet ¶
func NewWalletWithKeyStore ¶ added in v0.2.0
Only support Polka keystore.
func NewWalletWithMnemonic ¶ added in v0.2.0
func (*Wallet) CheckPassword ¶
check keystore password
func (*Wallet) GetAddress
deprecated
func (*Wallet) GetOrCreateBitcoinAccount ¶ added in v0.2.0
Get or create the bitcoin account with specified chainnet.
func (*Wallet) GetOrCreateCosmosAccount ¶ added in v0.2.2
Get or create cosmos chain account
func (*Wallet) GetOrCreateCosmosTypeAccount ¶ added in v0.2.2
func (w *Wallet) GetOrCreateCosmosTypeAccount(cointype int64, addressPrefix string) (*cosmos.Account, error)
Get or create a wallet account based on cosmos architecture.
func (*Wallet) GetOrCreateDogeAccount ¶ added in v0.2.5
func (*Wallet) GetOrCreateEthereumAccount ¶ added in v0.2.0
Get or create the ethereum account.
func (*Wallet) GetOrCreatePolkaAccount ¶ added in v0.2.0
Get or create the polka account with specified network.
func (*Wallet) GetOrCreateSolanaAccount ¶ added in v0.2.6
Get or create the ethereum account.
func (*Wallet) GetPrivateKeyHex
deprecated
func (*Wallet) GetPublicKey
deprecated
func (*Wallet) GetPublicKeyHex
deprecated
Click to show internal directories.
Click to hide internal directories.