github.com/MetalBlockchain/metalgo@v1.11.9/utils/crypto/secp256k1/test_keys.go (about)

     1  // Copyright (C) 2019-2024, Ava Labs, Inc. All rights reserved.
     2  // See the file LICENSE for licensing terms.
     3  
     4  package secp256k1
     5  
     6  import "github.com/MetalBlockchain/metalgo/utils/cb58"
     7  
     8  func TestKeys() []*PrivateKey {
     9  	var (
    10  		keyStrings = []string{
    11  			"24jUJ9vZexUM6expyMcT48LBx27k1m7xpraoV62oSQAHdziao5",
    12  			"2MMvUMsxx6zsHSNXJdFD8yc5XkancvwyKPwpw4xUK3TCGDuNBY",
    13  			"cxb7KpGWhDMALTjNNSJ7UQkkomPesyWAPUaWRGdyeBNzR6f35",
    14  			"ewoqjP7PxY4yr3iLTpLisriqt94hdyDFNgchSxGGztUrTXtNN",
    15  			"2RWLv6YVEXDiWLpaCbXhhqxtLbnFaKQsWPSSMSPhpWo47uJAeV",
    16  		}
    17  		keys = make([]*PrivateKey, len(keyStrings))
    18  	)
    19  
    20  	for i, key := range keyStrings {
    21  		privKeyBytes, err := cb58.Decode(key)
    22  		if err != nil {
    23  			panic(err)
    24  		}
    25  
    26  		keys[i], err = ToPrivateKey(privKeyBytes)
    27  		if err != nil {
    28  			panic(err)
    29  		}
    30  	}
    31  	return keys
    32  }