diff --git a/__fixtures__/v-next/outputosmojs/akash/client.ts b/__fixtures__/v-next/outputosmojs/akash/client.ts index adf09c7ab0..564870b96a 100644 --- a/__fixtures__/v-next/outputosmojs/akash/client.ts +++ b/__fixtures__/v-next/outputosmojs/akash/client.ts @@ -58,7 +58,7 @@ export const getSigningAkashClient = async ({ defaultTypes }); const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, { - registry, + registry: (registry as any), aminoTypes }); return client; diff --git a/__fixtures__/v-next/outputosmojs/cosmos/client.ts b/__fixtures__/v-next/outputosmojs/cosmos/client.ts index 79671b987a..d71646865f 100644 --- a/__fixtures__/v-next/outputosmojs/cosmos/client.ts +++ b/__fixtures__/v-next/outputosmojs/cosmos/client.ts @@ -71,7 +71,7 @@ export const getSigningCosmosClient = async ({ aminoTypes } = getSigningCosmosClientOptions(); const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, { - registry, + registry: (registry as any), aminoTypes }); return client; diff --git a/__fixtures__/v-next/outputosmojs/cosmwasm/client.ts b/__fixtures__/v-next/outputosmojs/cosmwasm/client.ts index 3246535660..1b6196fc7f 100644 --- a/__fixtures__/v-next/outputosmojs/cosmwasm/client.ts +++ b/__fixtures__/v-next/outputosmojs/cosmwasm/client.ts @@ -40,7 +40,7 @@ export const getSigningCosmwasmClient = async ({ defaultTypes }); const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, { - registry, + registry: (registry as any), aminoTypes }); return client; diff --git a/__fixtures__/v-next/outputosmojs/evmos/client.ts b/__fixtures__/v-next/outputosmojs/evmos/client.ts index 726d048f44..6b935a4a1d 100644 --- a/__fixtures__/v-next/outputosmojs/evmos/client.ts +++ b/__fixtures__/v-next/outputosmojs/evmos/client.ts @@ -46,7 +46,7 @@ export const getSigningEvmosClient = async ({ defaultTypes }); const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, { - registry, + registry: (registry as any), aminoTypes }); return client; diff --git a/__fixtures__/v-next/outputosmojs/ibc/client.ts b/__fixtures__/v-next/outputosmojs/ibc/client.ts index b53402f231..5f3f23488b 100644 --- a/__fixtures__/v-next/outputosmojs/ibc/client.ts +++ b/__fixtures__/v-next/outputosmojs/ibc/client.ts @@ -55,7 +55,7 @@ export const getSigningIbcClient = async ({ defaultTypes }); const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, { - registry, + registry: (registry as any), aminoTypes }); return client; diff --git a/__fixtures__/v-next/outputosmojs/osmosis/client.ts b/__fixtures__/v-next/outputosmojs/osmosis/client.ts index 74a6683af2..def190e062 100644 --- a/__fixtures__/v-next/outputosmojs/osmosis/client.ts +++ b/__fixtures__/v-next/outputosmojs/osmosis/client.ts @@ -70,7 +70,7 @@ export const getSigningOsmosisClient = async ({ defaultTypes }); const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, { - registry, + registry: (registry as any), aminoTypes }); return client; diff --git a/__fixtures__/v-next/outputv2/akash/client.ts b/__fixtures__/v-next/outputv2/akash/client.ts index b852518546..8f6b9790f1 100644 --- a/__fixtures__/v-next/outputv2/akash/client.ts +++ b/__fixtures__/v-next/outputv2/akash/client.ts @@ -61,7 +61,7 @@ export const getSigningAkashClient = async ({ defaultTypes }); const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, { - registry, + registry: (registry as any), aminoTypes }); return client; diff --git a/__fixtures__/v-next/outputv2/cosmos/client.ts b/__fixtures__/v-next/outputv2/cosmos/client.ts index 79671b987a..d71646865f 100644 --- a/__fixtures__/v-next/outputv2/cosmos/client.ts +++ b/__fixtures__/v-next/outputv2/cosmos/client.ts @@ -71,7 +71,7 @@ export const getSigningCosmosClient = async ({ aminoTypes } = getSigningCosmosClientOptions(); const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, { - registry, + registry: (registry as any), aminoTypes }); return client; diff --git a/__fixtures__/v-next/outputv2/cosmwasm/client.ts b/__fixtures__/v-next/outputv2/cosmwasm/client.ts index 3246535660..1b6196fc7f 100644 --- a/__fixtures__/v-next/outputv2/cosmwasm/client.ts +++ b/__fixtures__/v-next/outputv2/cosmwasm/client.ts @@ -40,7 +40,7 @@ export const getSigningCosmwasmClient = async ({ defaultTypes }); const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, { - registry, + registry: (registry as any), aminoTypes }); return client; diff --git a/__fixtures__/v-next/outputv2/evmos/client.ts b/__fixtures__/v-next/outputv2/evmos/client.ts index 726d048f44..6b935a4a1d 100644 --- a/__fixtures__/v-next/outputv2/evmos/client.ts +++ b/__fixtures__/v-next/outputv2/evmos/client.ts @@ -46,7 +46,7 @@ export const getSigningEvmosClient = async ({ defaultTypes }); const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, { - registry, + registry: (registry as any), aminoTypes }); return client; diff --git a/__fixtures__/v-next/outputv2/google/protobuf/any.ts b/__fixtures__/v-next/outputv2/google/protobuf/any.ts index 63406b76dd..8b4a7bae39 100644 --- a/__fixtures__/v-next/outputv2/google/protobuf/any.ts +++ b/__fixtures__/v-next/outputv2/google/protobuf/any.ts @@ -393,13 +393,13 @@ export const Any = { }, fromAmino(object: AnyAmino): Any { return { - typeUrl: object.type_url, + typeUrl: object.type, value: object.value }; }, toAmino(message: Any): AnyAmino { const obj: any = {}; - obj.type_url = message.typeUrl; + obj.type = message.typeUrl; obj.value = message.value; return obj; }, diff --git a/__fixtures__/v-next/outputv2/ibc/client.ts b/__fixtures__/v-next/outputv2/ibc/client.ts index 33dfa5aefc..1256ef06d1 100644 --- a/__fixtures__/v-next/outputv2/ibc/client.ts +++ b/__fixtures__/v-next/outputv2/ibc/client.ts @@ -49,7 +49,7 @@ export const getSigningIbcClient = async ({ defaultTypes }); const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, { - registry, + registry: (registry as any), aminoTypes }); return client; diff --git a/__fixtures__/v-next/outputv2/osmosis/client.ts b/__fixtures__/v-next/outputv2/osmosis/client.ts index 66cfe09aa7..48df1de1b5 100644 --- a/__fixtures__/v-next/outputv2/osmosis/client.ts +++ b/__fixtures__/v-next/outputv2/osmosis/client.ts @@ -58,7 +58,7 @@ export const getSigningOsmosisClient = async ({ defaultTypes }); const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, { - registry, + registry: (registry as any), aminoTypes }); return client; diff --git a/__fixtures__/v-next/outputv3/akash/client.ts b/__fixtures__/v-next/outputv3/akash/client.ts index b852518546..8f6b9790f1 100644 --- a/__fixtures__/v-next/outputv3/akash/client.ts +++ b/__fixtures__/v-next/outputv3/akash/client.ts @@ -61,7 +61,7 @@ export const getSigningAkashClient = async ({ defaultTypes }); const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, { - registry, + registry: (registry as any), aminoTypes }); return client; diff --git a/__fixtures__/v-next/outputv3/cosmos/client.ts b/__fixtures__/v-next/outputv3/cosmos/client.ts index 79671b987a..d71646865f 100644 --- a/__fixtures__/v-next/outputv3/cosmos/client.ts +++ b/__fixtures__/v-next/outputv3/cosmos/client.ts @@ -71,7 +71,7 @@ export const getSigningCosmosClient = async ({ aminoTypes } = getSigningCosmosClientOptions(); const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, { - registry, + registry: (registry as any), aminoTypes }); return client; diff --git a/__fixtures__/v-next/outputv3/cosmwasm/client.ts b/__fixtures__/v-next/outputv3/cosmwasm/client.ts index 3246535660..1b6196fc7f 100644 --- a/__fixtures__/v-next/outputv3/cosmwasm/client.ts +++ b/__fixtures__/v-next/outputv3/cosmwasm/client.ts @@ -40,7 +40,7 @@ export const getSigningCosmwasmClient = async ({ defaultTypes }); const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, { - registry, + registry: (registry as any), aminoTypes }); return client; diff --git a/__fixtures__/v-next/outputv3/evmos/client.ts b/__fixtures__/v-next/outputv3/evmos/client.ts index 726d048f44..6b935a4a1d 100644 --- a/__fixtures__/v-next/outputv3/evmos/client.ts +++ b/__fixtures__/v-next/outputv3/evmos/client.ts @@ -46,7 +46,7 @@ export const getSigningEvmosClient = async ({ defaultTypes }); const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, { - registry, + registry: (registry as any), aminoTypes }); return client; diff --git a/__fixtures__/v-next/outputv3/google/protobuf/any.ts b/__fixtures__/v-next/outputv3/google/protobuf/any.ts index 63406b76dd..8b4a7bae39 100644 --- a/__fixtures__/v-next/outputv3/google/protobuf/any.ts +++ b/__fixtures__/v-next/outputv3/google/protobuf/any.ts @@ -393,13 +393,13 @@ export const Any = { }, fromAmino(object: AnyAmino): Any { return { - typeUrl: object.type_url, + typeUrl: object.type, value: object.value }; }, toAmino(message: Any): AnyAmino { const obj: any = {}; - obj.type_url = message.typeUrl; + obj.type = message.typeUrl; obj.value = message.value; return obj; }, diff --git a/__fixtures__/v-next/outputv3/ibc/client.ts b/__fixtures__/v-next/outputv3/ibc/client.ts index 33dfa5aefc..1256ef06d1 100644 --- a/__fixtures__/v-next/outputv3/ibc/client.ts +++ b/__fixtures__/v-next/outputv3/ibc/client.ts @@ -49,7 +49,7 @@ export const getSigningIbcClient = async ({ defaultTypes }); const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, { - registry, + registry: (registry as any), aminoTypes }); return client; diff --git a/__fixtures__/v-next/outputv3/osmosis/client.ts b/__fixtures__/v-next/outputv3/osmosis/client.ts index 66cfe09aa7..48df1de1b5 100644 --- a/__fixtures__/v-next/outputv3/osmosis/client.ts +++ b/__fixtures__/v-next/outputv3/osmosis/client.ts @@ -58,7 +58,7 @@ export const getSigningOsmosisClient = async ({ defaultTypes }); const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, { - registry, + registry: (registry as any), aminoTypes }); return client; diff --git a/__fixtures__/v-next/outputv4/akash/client.ts b/__fixtures__/v-next/outputv4/akash/client.ts index adf09c7ab0..564870b96a 100644 --- a/__fixtures__/v-next/outputv4/akash/client.ts +++ b/__fixtures__/v-next/outputv4/akash/client.ts @@ -58,7 +58,7 @@ export const getSigningAkashClient = async ({ defaultTypes }); const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, { - registry, + registry: (registry as any), aminoTypes }); return client; diff --git a/__fixtures__/v-next/outputv4/cosmos/client.ts b/__fixtures__/v-next/outputv4/cosmos/client.ts index 79671b987a..d71646865f 100644 --- a/__fixtures__/v-next/outputv4/cosmos/client.ts +++ b/__fixtures__/v-next/outputv4/cosmos/client.ts @@ -71,7 +71,7 @@ export const getSigningCosmosClient = async ({ aminoTypes } = getSigningCosmosClientOptions(); const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, { - registry, + registry: (registry as any), aminoTypes }); return client; diff --git a/__fixtures__/v-next/outputv4/cosmwasm/client.ts b/__fixtures__/v-next/outputv4/cosmwasm/client.ts index 3246535660..1b6196fc7f 100644 --- a/__fixtures__/v-next/outputv4/cosmwasm/client.ts +++ b/__fixtures__/v-next/outputv4/cosmwasm/client.ts @@ -40,7 +40,7 @@ export const getSigningCosmwasmClient = async ({ defaultTypes }); const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, { - registry, + registry: (registry as any), aminoTypes }); return client; diff --git a/__fixtures__/v-next/outputv4/evmos/client.ts b/__fixtures__/v-next/outputv4/evmos/client.ts index 726d048f44..6b935a4a1d 100644 --- a/__fixtures__/v-next/outputv4/evmos/client.ts +++ b/__fixtures__/v-next/outputv4/evmos/client.ts @@ -46,7 +46,7 @@ export const getSigningEvmosClient = async ({ defaultTypes }); const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, { - registry, + registry: (registry as any), aminoTypes }); return client; diff --git a/__fixtures__/v-next/outputv4/ibc/client.ts b/__fixtures__/v-next/outputv4/ibc/client.ts index 33dfa5aefc..1256ef06d1 100644 --- a/__fixtures__/v-next/outputv4/ibc/client.ts +++ b/__fixtures__/v-next/outputv4/ibc/client.ts @@ -49,7 +49,7 @@ export const getSigningIbcClient = async ({ defaultTypes }); const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, { - registry, + registry: (registry as any), aminoTypes }); return client; diff --git a/__fixtures__/v-next/outputv4/osmosis/client.ts b/__fixtures__/v-next/outputv4/osmosis/client.ts index 66cfe09aa7..48df1de1b5 100644 --- a/__fixtures__/v-next/outputv4/osmosis/client.ts +++ b/__fixtures__/v-next/outputv4/osmosis/client.ts @@ -58,7 +58,7 @@ export const getSigningOsmosisClient = async ({ defaultTypes }); const client = await SigningStargateClient.connectWithSigner(rpcEndpoint, signer, { - registry, + registry: (registry as any), aminoTypes }); return client; diff --git a/packages/ast/types/src/encoding/proto/from-amino/utils.d.ts b/packages/ast/types/src/encoding/proto/from-amino/utils.d.ts index 193ba37305..da9a95074a 100644 --- a/packages/ast/types/src/encoding/proto/from-amino/utils.d.ts +++ b/packages/ast/types/src/encoding/proto/from-amino/utils.d.ts @@ -58,6 +58,8 @@ export declare const arrayTypes: { type(args: FromAminoJSONMethod): t.CallExpression; }; export declare const fromAminoMessages: { + anyType(): t.ReturnStatement[]; + timestamp(context: ProtoParseContext, name: string, proto: ProtoType): t.ReturnStatement[]; height(context: ProtoParseContext, name: string, proto: ProtoType): t.ReturnStatement[]; duration(context: ProtoParseContext, name: string, proto: ProtoType): (t.ReturnStatement | t.VariableDeclaration)[]; }; diff --git a/packages/ast/types/src/encoding/proto/to-amino/utils.d.ts b/packages/ast/types/src/encoding/proto/to-amino/utils.d.ts index 01cb831c25..19e3fb42c8 100644 --- a/packages/ast/types/src/encoding/proto/to-amino/utils.d.ts +++ b/packages/ast/types/src/encoding/proto/to-amino/utils.d.ts @@ -58,5 +58,7 @@ export declare const arrayTypes: { type(args: ToAminoJSONMethod): t.ConditionalExpression; }; export declare const toAminoMessages: { + anyType(): (t.ExpressionStatement | t.ReturnStatement | t.VariableDeclaration)[]; + timestamp(context: ProtoParseContext, name: string, proto: ProtoType): t.ReturnStatement; duration(context: ProtoParseContext, name: string, proto: ProtoType): t.ReturnStatement; };