flow-emulator icon indicating copy to clipboard operation
flow-emulator copied to clipboard

Account key structs

Open bluesign opened this issue 4 years ago • 0 comments
trafficstars

Issue To Be Solved

We have 2 different key structs in codebase and they are pretty much same (except order of SeqNumber and Weight)

type sdk.AccountKey struct {
	Index          int
	PublicKey      crypto.PublicKey
	SigAlgo        crypto.SignatureAlgorithm
	HashAlgo       crypto.HashAlgorithm
	Weight         int
	SequenceNumber uint64
	Revoked        bool
}
type flow-go.AccountPublicKey struct {
	Index     int
	PublicKey crypto.PublicKey
	SignAlgo  crypto.SigningAlgorithm
	HashAlgo  hash.HashingAlgorithm
	SeqNumber uint64
	Weight    int
	Revoked   bool
}

I think it would be nice to get rid of one or at least make structures same.

bluesign avatar Nov 15 '21 08:11 bluesign