Documentation ¶
Index ¶
- func GenPrivKeyFromSecret(seed []byte, c PolySignature) (interface{}, error)
- func GetPublicKeyFromSeed(seed []byte, c PolySignature, compressed bool) ([]byte, error)
- func NewMnemonic(wordCount int, lang string) (string, error)
- func RawPubKeyToETHAddress(concat []byte) common.Address
- type PolyAddressExport
- type PolySignature
- type PolyWallet
- func (p *PolyWallet) ExportHDAddresses(count int) (*PolyWalletExport, error)
- func (p *PolyWallet) ExportRootAddress() (*PolyWalletExport, error)
- func (p *PolyWallet) GetKey() (*bip32.Key, error)
- func (p *PolyWallet) GetKeyForPath(inputPath string) (*bip32.Key, error)
- func (p *PolyWallet) SetIterations(iterations uint) error
- func (p *PolyWallet) SetPath(path string) error
- func (p *PolyWallet) SetUseRawEntropy(e bool) error
- type PolyWalletExport
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenPrivKeyFromSecret ¶
func GenPrivKeyFromSecret(seed []byte, c PolySignature) (interface{}, error)
func GetPublicKeyFromSeed ¶
func GetPublicKeyFromSeed(seed []byte, c PolySignature, compressed bool) ([]byte, error)
func RawPubKeyToETHAddress ¶
Types ¶
type PolyAddressExport ¶
type PolyAddressExport struct { Path string `json:",omitempty"` // contains filtered or unexported fields }
type PolySignature ¶
type PolySignature int
const ( SignatureSecp256k1 PolySignature = iota SignatureEd25519 SignatureSr25519 )
type PolyWallet ¶
type PolyWallet struct { Mnemonic string Passphrase string // contains filtered or unexported fields }
func NewPolyWallet ¶
func NewPolyWallet(mnemonic, password string) (*PolyWallet, error)
func NewPolyWalletFromSeed ¶
func NewPolyWalletFromSeed(seed []byte) (*PolyWallet, error)
func (*PolyWallet) ExportHDAddresses ¶
func (p *PolyWallet) ExportHDAddresses(count int) (*PolyWalletExport, error)
func (*PolyWallet) ExportRootAddress ¶
func (p *PolyWallet) ExportRootAddress() (*PolyWalletExport, error)
func (*PolyWallet) GetKey ¶
func (p *PolyWallet) GetKey() (*bip32.Key, error)
func (*PolyWallet) GetKeyForPath ¶
func (p *PolyWallet) GetKeyForPath(inputPath string) (*bip32.Key, error)
func (*PolyWallet) SetIterations ¶
func (p *PolyWallet) SetIterations(iterations uint) error
func (*PolyWallet) SetPath ¶
func (p *PolyWallet) SetPath(path string) error
func (*PolyWallet) SetUseRawEntropy ¶
func (p *PolyWallet) SetUseRawEntropy(e bool) error
type PolyWalletExport ¶
type PolyWalletExport struct { RootKey string `json:",omitempty"` Seed string `json:",omitempty"` Mnemonic string `json:",omitempty"` Passphrase string `json:",omitempty"` DerivationPath string `json:",omitempty"` AccountPublicKey string `json:",omitempty"` AccountPrivateKey string `json:",omitempty"` BIP32PublicKey string `json:",omitempty"` BIP32PrivateKey string `json:",omitempty"` Addresses []*PolyAddressExport `json:",omitempty"` // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.