Moved AminoConverts back to aminotypes.ts

This commit is contained in:
Milan Steiner 2022-03-10 11:41:46 +01:00
parent 4eab4611dc
commit d8d1e7c508
2 changed files with 8 additions and 9 deletions

View File

@ -1,8 +0,0 @@
export interface AminoConverter {
readonly aminoType: string;
readonly toAmino: (value: any) => any;
readonly fromAmino: (value: any) => any;
}
/** A map from protobuf type URL to the AminoConverter implementation if supported on chain */
export type AminoConverters = Record<string, AminoConverter | "not_supported_by_chain">;

View File

@ -2,7 +2,14 @@
import { AminoMsg } from "@cosmjs/amino";
import { EncodeObject } from "@cosmjs/proto-signing";
import { AminoConverter, AminoConverters } from "./aminoconverters";
export interface AminoConverter {
readonly aminoType: string;
readonly toAmino: (value: any) => any;
readonly fromAmino: (value: any) => any;
}
/** A map from protobuf type URL to the AminoConverter implementation if supported on chain */
export type AminoConverters = Record<string, AminoConverter | "not_supported_by_chain">;
function isAminoConverter(
converter: [string, AminoConverter | "not_supported_by_chain"],