forked from ava-labs/avalanchego
/
test_keys.go
35 lines (30 loc) · 836 Bytes
/
test_keys.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
// Copyright (C) 2019-2023, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package secp256k1
import (
"github.com/VidarSolutions/avalanchego/utils/cb58"
)
func TestKeys() []*PrivateKey {
var (
keyStrings = []string{
"24jUJ9vZexUM6expyMcT48LBx27k1m7xpraoV62oSQAHdziao5",
"2MMvUMsxx6zsHSNXJdFD8yc5XkancvwyKPwpw4xUK3TCGDuNBY",
"cxb7KpGWhDMALTjNNSJ7UQkkomPesyWAPUaWRGdyeBNzR6f35",
"ewoqjP7PxY4yr3iLTpLisriqt94hdyDFNgchSxGGztUrTXtNN",
"2RWLv6YVEXDiWLpaCbXhhqxtLbnFaKQsWPSSMSPhpWo47uJAeV",
}
keys = make([]*PrivateKey, len(keyStrings))
factory = Factory{}
)
for i, key := range keyStrings {
privKeyBytes, err := cb58.Decode(key)
if err != nil {
panic(err)
}
keys[i], err = factory.ToPrivateKey(privKeyBytes)
if err != nil {
panic(err)
}
}
return keys
}