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
Cosmos SDK introduced SIGN_MODE_DIRECT which replaces the original sign mode (now differentiated as SIGN_MODE_LEGACY_AMINO_JSON) cosmos-sdk docs. However, most ledger devices/apps only support the legacy mode, which requires dApps to support both sign modes. In order to support the legacy mode, the dApp will need to provide an Amino converter for each protobuf type, to convert the object instance into an Amino JSON used for the signing.
In the legacy Carbon JS SDK implementation, the Amino converters were manually written for each new type added (example). We would like to explore possibility of generating the type converters instead. The information is already available in the type .proto files, however I am not sure if the generator we're using ts-proto is able to parse it.
To summarise, there're two main unknowns we need to get past before knowing we can proceed with implementing a generator for animo types.
can existing TypeScript generator include animo.name option in the output? otherwise does it make sense to extract if using another tool/script?
is it possible to auto map the sdk/Dec, Long, Duration and other common types, such that majority of the amino type converter generations can be automated?
The text was updated successfully, but these errors were encountered:
Cosmos SDK introduced
SIGN_MODE_DIRECT
which replaces the original sign mode (now differentiated asSIGN_MODE_LEGACY_AMINO_JSON
) cosmos-sdk docs. However, most ledger devices/apps only support the legacy mode, which requires dApps to support both sign modes. In order to support the legacy mode, the dApp will need to provide an Amino converter for each protobuf type, to convert the object instance into an Amino JSON used for the signing.In the legacy Carbon JS SDK implementation, the Amino converters were manually written for each new type added (example). We would like to explore possibility of generating the type converters instead. The information is already available in the type
.proto
files, however I am not sure if the generator we're using ts-proto is able to parse it.An snippet of the source
.proto
file:The Animo types is usually registered when instantiating some version of a signing client.
To summarise, there're two main unknowns we need to get past before knowing we can proceed with implementing a generator for animo types.
animo.name
option in the output? otherwise does it make sense to extract if using another tool/script?sdk/Dec
,Long
,Duration
and other common types, such that majority of the amino type converter generations can be automated?The text was updated successfully, but these errors were encountered: