Insert Random Persona <-> Given ETH public key binding.
(t *testing.T, eth_pub_key *ecdsa.PublicKey)
| 106 | |
| 107 | // / Insert Random Persona <-> Given ETH public key binding. |
| 108 | func insert_eth_proof(t *testing.T, eth_pub_key *ecdsa.PublicKey) { |
| 109 | personaPk, _ := crypto.GenerateKeypair() |
| 110 | validator := validator.Base{ |
| 111 | Platform: types.Platforms.Ethereum, |
| 112 | Previous: "", |
| 113 | Action: types.Actions.Create, |
| 114 | Pubkey: personaPk, |
| 115 | Identity: strings.ToLower(ethcrypto.PubkeyToAddress(*eth_pub_key).String()), |
| 116 | ProofLocation: "", |
| 117 | Signature: []byte{1}, |
| 118 | SignaturePayload: "", |
| 119 | Text: "", |
| 120 | Extra: map[string]string{}, |
| 121 | } |
| 122 | pc, err := model.ProofChainCreateFromValidator(&validator) |
| 123 | require.Nil(t, err) |
| 124 | err = pc.Apply() |
| 125 | require.Nil(t, err) |
| 126 | } |
| 127 | |
| 128 | func Test_proofQuery(t *testing.T) { |
| 129 | t.Run("smoke", func(t *testing.T) { |
no test coverage detected