MCPcopy Create free account
hub / github.com/DNAProject/DNA / GetAccount

Function GetAccount

cmd/common/common.go:122–139  ·  view source on GitHub ↗
(ctx *cli.Context, address ...string)

Source from the content-addressed store, hash-verified

120}
121
122func GetAccount(ctx *cli.Context, address ...string) (*account.Account, error) {
123 wallet, err := OpenWallet(ctx)
124 if err != nil {
125 return nil, err
126 }
127 passwd, err := GetPasswd(ctx)
128 if err != nil {
129 return nil, err
130 }
131 defer ClearPasswd(passwd)
132 accAddr := ""
133 if len(address) > 0 {
134 accAddr = address[0]
135 } else {
136 accAddr = ctx.String(utils.GetFlagName(utils.AccountAddressFlag))
137 }
138 return GetAccountMulti(wallet, passwd, accAddr)
139}
140
141func IsBase58Address(address string) bool {
142 if address == "" {

Callers

nothing calls this directly

Calls 6

GetFlagNameFunction · 0.92
OpenWalletFunction · 0.85
GetPasswdFunction · 0.85
ClearPasswdFunction · 0.85
GetAccountMultiFunction · 0.85
StringMethod · 0.45

Tested by

no test coverage detected