You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.
For example, below script should be able to produce equivalent outcome of encode/decode when generated.
type Transaction struct {
SigningTransaction
ID codec.Hex `json:"id"`
size int `json:"-"`
Signatures []codec.Hex `json:"signatures" fieldNumber:"8"`
}
In case of the embedded struct is from another package, it can be ignored
Motivation
Sometimes, there are multiple version of types needs to be defined. For example, Transaction/Block header has signing block/transaction type and ones with signatures.
Currently, they are independent struct, but since properties are the same, it would be nice to be able to declare as an embedded struct
Additional Information
codec generation is parsing per file/package. Therefore, it cannot tell if struct from other package is encodable or not
The text was updated successfully, but these errors were encountered:
Description
For example, below script should be able to produce equivalent outcome of encode/decode when generated.
Motivation
Sometimes, there are multiple version of types needs to be defined. For example, Transaction/Block header has signing block/transaction type and ones with signatures.
Currently, they are independent struct, but since properties are the same, it would be nice to be able to declare as an embedded struct
Additional Information
The text was updated successfully, but these errors were encountered: