/
github_com-ethereum-go-ethereum-accounts.go
137 lines (128 loc) · 7.64 KB
/
github_com-ethereum-go-ethereum-accounts.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
// Code generated by 'yaegi extract github.com/ethereum/go-ethereum/accounts'. DO NOT EDIT.
package symbol
import (
"github.com/ethereum/go-ethereum"
"github.com/ethereum/go-ethereum/accounts"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/event"
"go/constant"
"go/token"
"math/big"
"reflect"
)
func init() {
Symbols["github.com/ethereum/go-ethereum/accounts/accounts"] = map[string]reflect.Value{
// function, constant and variable definitions
"DefaultBaseDerivationPath": reflect.ValueOf(&accounts.DefaultBaseDerivationPath).Elem(),
"DefaultIterator": reflect.ValueOf(accounts.DefaultIterator),
"DefaultRootDerivationPath": reflect.ValueOf(&accounts.DefaultRootDerivationPath).Elem(),
"ErrInvalidPassphrase": reflect.ValueOf(&accounts.ErrInvalidPassphrase).Elem(),
"ErrNotSupported": reflect.ValueOf(&accounts.ErrNotSupported).Elem(),
"ErrUnknownAccount": reflect.ValueOf(&accounts.ErrUnknownAccount).Elem(),
"ErrUnknownWallet": reflect.ValueOf(&accounts.ErrUnknownWallet).Elem(),
"ErrWalletAlreadyOpen": reflect.ValueOf(&accounts.ErrWalletAlreadyOpen).Elem(),
"ErrWalletClosed": reflect.ValueOf(&accounts.ErrWalletClosed).Elem(),
"LedgerLiveIterator": reflect.ValueOf(accounts.LedgerLiveIterator),
"LegacyLedgerBaseDerivationPath": reflect.ValueOf(&accounts.LegacyLedgerBaseDerivationPath).Elem(),
"MimetypeClique": reflect.ValueOf(constant.MakeFromLiteral("\"application/x-clique-header\"", token.STRING, 0)),
"MimetypeDataWithValidator": reflect.ValueOf(constant.MakeFromLiteral("\"data/validator\"", token.STRING, 0)),
"MimetypeTextPlain": reflect.ValueOf(constant.MakeFromLiteral("\"text/plain\"", token.STRING, 0)),
"MimetypeTypedData": reflect.ValueOf(constant.MakeFromLiteral("\"data/typed\"", token.STRING, 0)),
"NewAuthNeededError": reflect.ValueOf(accounts.NewAuthNeededError),
"NewManager": reflect.ValueOf(accounts.NewManager),
"ParseDerivationPath": reflect.ValueOf(accounts.ParseDerivationPath),
"TextAndHash": reflect.ValueOf(accounts.TextAndHash),
"TextHash": reflect.ValueOf(accounts.TextHash),
"WalletArrived": reflect.ValueOf(accounts.WalletArrived),
"WalletDropped": reflect.ValueOf(accounts.WalletDropped),
"WalletOpened": reflect.ValueOf(accounts.WalletOpened),
// type definitions
"Account": reflect.ValueOf((*accounts.Account)(nil)),
"AccountsByURL": reflect.ValueOf((*accounts.AccountsByURL)(nil)),
"AuthNeededError": reflect.ValueOf((*accounts.AuthNeededError)(nil)),
"Backend": reflect.ValueOf((*accounts.Backend)(nil)),
"Config": reflect.ValueOf((*accounts.Config)(nil)),
"DerivationPath": reflect.ValueOf((*accounts.DerivationPath)(nil)),
"Manager": reflect.ValueOf((*accounts.Manager)(nil)),
"URL": reflect.ValueOf((*accounts.URL)(nil)),
"Wallet": reflect.ValueOf((*accounts.Wallet)(nil)),
"WalletEvent": reflect.ValueOf((*accounts.WalletEvent)(nil)),
"WalletEventType": reflect.ValueOf((*accounts.WalletEventType)(nil)),
"WalletsByURL": reflect.ValueOf((*accounts.WalletsByURL)(nil)),
// interface wrapper definitions
"_Backend": reflect.ValueOf((*_github_com_ethereum_go_ethereum_accounts_Backend)(nil)),
"_Wallet": reflect.ValueOf((*_github_com_ethereum_go_ethereum_accounts_Wallet)(nil)),
}
}
// _github_com_ethereum_go_ethereum_accounts_Backend is an interface wrapper for Backend type
type _github_com_ethereum_go_ethereum_accounts_Backend struct {
IValue interface{}
WSubscribe func(sink chan<- accounts.WalletEvent) event.Subscription
WWallets func() []accounts.Wallet
}
func (W _github_com_ethereum_go_ethereum_accounts_Backend) Subscribe(sink chan<- accounts.WalletEvent) event.Subscription {
return W.WSubscribe(sink)
}
func (W _github_com_ethereum_go_ethereum_accounts_Backend) Wallets() []accounts.Wallet {
return W.WWallets()
}
// _github_com_ethereum_go_ethereum_accounts_Wallet is an interface wrapper for Wallet type
type _github_com_ethereum_go_ethereum_accounts_Wallet struct {
IValue interface{}
WAccounts func() []accounts.Account
WClose func() error
WContains func(account accounts.Account) bool
WDerive func(path accounts.DerivationPath, pin bool) (accounts.Account, error)
WOpen func(passphrase string) error
WSelfDerive func(bases []accounts.DerivationPath, chain ethereum.ChainStateReader)
WSignData func(account accounts.Account, mimeType string, data []byte) ([]byte, error)
WSignDataWithPassphrase func(account accounts.Account, passphrase string, mimeType string, data []byte) ([]byte, error)
WSignText func(account accounts.Account, text []byte) ([]byte, error)
WSignTextWithPassphrase func(account accounts.Account, passphrase string, hash []byte) ([]byte, error)
WSignTx func(account accounts.Account, tx *types.Transaction, chainID *big.Int) (*types.Transaction, error)
WSignTxWithPassphrase func(account accounts.Account, passphrase string, tx *types.Transaction, chainID *big.Int) (*types.Transaction, error)
WStatus func() (string, error)
WURL func() accounts.URL
}
func (W _github_com_ethereum_go_ethereum_accounts_Wallet) Accounts() []accounts.Account {
return W.WAccounts()
}
func (W _github_com_ethereum_go_ethereum_accounts_Wallet) Close() error {
return W.WClose()
}
func (W _github_com_ethereum_go_ethereum_accounts_Wallet) Contains(account accounts.Account) bool {
return W.WContains(account)
}
func (W _github_com_ethereum_go_ethereum_accounts_Wallet) Derive(path accounts.DerivationPath, pin bool) (accounts.Account, error) {
return W.WDerive(path, pin)
}
func (W _github_com_ethereum_go_ethereum_accounts_Wallet) Open(passphrase string) error {
return W.WOpen(passphrase)
}
func (W _github_com_ethereum_go_ethereum_accounts_Wallet) SelfDerive(bases []accounts.DerivationPath, chain ethereum.ChainStateReader) {
W.WSelfDerive(bases, chain)
}
func (W _github_com_ethereum_go_ethereum_accounts_Wallet) SignData(account accounts.Account, mimeType string, data []byte) ([]byte, error) {
return W.WSignData(account, mimeType, data)
}
func (W _github_com_ethereum_go_ethereum_accounts_Wallet) SignDataWithPassphrase(account accounts.Account, passphrase string, mimeType string, data []byte) ([]byte, error) {
return W.WSignDataWithPassphrase(account, passphrase, mimeType, data)
}
func (W _github_com_ethereum_go_ethereum_accounts_Wallet) SignText(account accounts.Account, text []byte) ([]byte, error) {
return W.WSignText(account, text)
}
func (W _github_com_ethereum_go_ethereum_accounts_Wallet) SignTextWithPassphrase(account accounts.Account, passphrase string, hash []byte) ([]byte, error) {
return W.WSignTextWithPassphrase(account, passphrase, hash)
}
func (W _github_com_ethereum_go_ethereum_accounts_Wallet) SignTx(account accounts.Account, tx *types.Transaction, chainID *big.Int) (*types.Transaction, error) {
return W.WSignTx(account, tx, chainID)
}
func (W _github_com_ethereum_go_ethereum_accounts_Wallet) SignTxWithPassphrase(account accounts.Account, passphrase string, tx *types.Transaction, chainID *big.Int) (*types.Transaction, error) {
return W.WSignTxWithPassphrase(account, passphrase, tx, chainID)
}
func (W _github_com_ethereum_go_ethereum_accounts_Wallet) Status() (string, error) {
return W.WStatus()
}
func (W _github_com_ethereum_go_ethereum_accounts_Wallet) URL() accounts.URL {
return W.WURL()
}