Versions in this module Expand all Collapse all v0 v0.1.2 Jun 22, 2022 v0.1.1 Jun 22, 2022 v0.1.0 Jun 22, 2022 Changes in this version + const P1DeriveKeyFromCurrent + const P1DeriveKeyFromMaster + const P1DeriveKeyFromParent + const Scheme + var DerivationSignatureHash = sha256.Sum256(common.Hash{}.Bytes()) + var ErrAlreadyOpen = errors.New("smartcard: already open") + var ErrPINNeeded = errors.New("smartcard: pin needed") + var ErrPINUnblockNeeded = errors.New("smartcard: pin unblock needed") + var ErrPairingPasswordNeeded = errors.New("smartcard: pairing password needed") + var ErrPubkeyMismatch = errors.New("smartcard: recovered public key mismatch") + type AXIAwallet struct + Hub *Hub + PublicKey []byte + func NewAXIAwallet(hub *Hub, card *pcsc.Card) *AXIAwallet + func (w *AXIAwallet) Accounts() []accounts.Account + func (w *AXIAwallet) Close() error + func (w *AXIAwallet) Contains(account accounts.Account) bool + func (w *AXIAwallet) Derive(path accounts.DerivationPath, pin bool) (accounts.Account, error) + func (w *AXIAwallet) Initialize(seed []byte) error + func (w *AXIAwallet) Open(passphrase string) error + func (w *AXIAwallet) SelfDerive(bases []accounts.DerivationPath, chain interfaces.ChainStateReader) + func (w *AXIAwallet) SignData(account accounts.Account, mimeType string, data []byte) ([]byte, error) + func (w *AXIAwallet) SignDataWithPassphrase(account accounts.Account, passphrase, mimeType string, data []byte) ([]byte, error) + func (w *AXIAwallet) SignText(account accounts.Account, text []byte) ([]byte, error) + func (w *AXIAwallet) SignTextWithPassphrase(account accounts.Account, passphrase string, text []byte) ([]byte, error) + func (w *AXIAwallet) SignTx(account accounts.Account, tx *types.Transaction, chainID *big.Int) (*types.Transaction, error) + func (w *AXIAwallet) SignTxWithPassphrase(account accounts.Account, passphrase string, tx *types.Transaction, ...) (*types.Transaction, error) + func (w *AXIAwallet) Status() (string, error) + func (w *AXIAwallet) URL() accounts.URL + func (w *AXIAwallet) Unpair(pin []byte) error + type Hub struct + func NewHub(daemonPath string, scheme string, datadir string) (*Hub, error) + func (hub *Hub) AXIAwallets() []accounts.AXIAwallet + func (hub *Hub) Subscribe(sink chan<- accounts.AXIAwalletEvent) event.Subscription + type SecureChannelSession struct + PairingIndex uint8 + PairingKey []byte + func NewSecureChannelSession(card *pcsc.Card, keyData []byte) (*SecureChannelSession, error) + func (s *SecureChannelSession) Open() error + func (s *SecureChannelSession) Pair(pairingPassword []byte) error + func (s *SecureChannelSession) Unpair() error + type Session struct + AXIAwallet *AXIAwallet + Channel *SecureChannelSession