-
Notifications
You must be signed in to change notification settings - Fork 3
/
account-info_test.go
64 lines (56 loc) · 1.19 KB
/
account-info_test.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
package cryptonym
import (
"encoding/json"
"fmt"
"testing"
)
/*
"Actor/Account",
"Public Key",
"Private Key",
"Fio Address",
"Fio Domain"
*/
func TestAccountSearch(t *testing.T) {
pub := "FIO6G9pXXM92Gy5eMwNquGULoCj3ZStwPLPdEb9mVXyEHqWN7HSuA"
priv := "5JBbUG5SDpLWxvBKihMeXLENinUzdNKNeozLas23Mj6ZNhz3hLS"
actor := "o2ouxipw2rt4"
address := "vote1@dapixdev"
Uri = "http://localhost:8888"
a, e := AccountSearch("Fio Address", address)
if e != nil {
t.Error(e.Error())
} else {
j, _ := json.MarshalIndent(a, "", " ")
fmt.Println("address:")
fmt.Println(string(j))
fmt.Println("")
}
a, e = AccountSearch("Private Key", priv)
if e != nil {
t.Error(e.Error())
} else {
j, _ := json.MarshalIndent(a, "", " ")
fmt.Println("priv:")
fmt.Println(string(j))
fmt.Println("")
}
a, e = AccountSearch("Public Key", pub)
if e != nil {
t.Error(e.Error())
} else {
j, _ := json.MarshalIndent(a, "", " ")
fmt.Println("pub:")
fmt.Println(string(j))
fmt.Println("")
}
a, e = AccountSearch("Actor/Account", actor)
if e != nil {
t.Error(e.Error())
} else {
j, _ := json.MarshalIndent(a, "", " ")
fmt.Println("actor:")
fmt.Println(string(j))
fmt.Println("")
}
}