Skip to content

Commit

Permalink
Merge pull request #465 from cosmology-tech/changes-v1
Browse files Browse the repository at this point in the history
default config value changes of v1.0
  • Loading branch information
Zetazzz authored Sep 13, 2023
2 parents 712e1fc + fcf5774 commit f2f9db3
Show file tree
Hide file tree
Showing 1,427 changed files with 162,146 additions and 21,419 deletions.
15 changes: 4 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,14 +258,14 @@ telescope({
| `aminoEncoding.casingFn` | set the amino-casing function for a project | `snake()` |
| `aminoEncoding.exceptions` | set specific aminoType name exceptions | see code |
| `aminoEncoding.typeUrlToAmino` | create functions for aminoType name exceptions | `undefined`|
| `aminoEncoding.useLegacyInlineEncoding` | @deprecated, To use legacy inline encoding instead of using v2 recursive encoding | `true`|
| `aminoEncoding.useRecursiveV2encoding` | @deprecated, legacy option, if useLegacyInlineEncoding is set, this will be ignored. | null |
| `aminoEncoding.useLegacyInlineEncoding` | @deprecated. To use legacy inline encoding instead of using v2 recursive encoding | `false`|
| `aminoEncoding.useRecursiveV2encoding` | this's been removed. See useLegacyInlineEncoding instead. | |

### Implemented Interface Options

| option | description | defaults |
| ----------------------------------------- | -------------------------------------------------------------- | ---------- |
| `interfaces.enabled` | enables converters convert between Any type and specific implemented interfaces. | `false` |
| `interfaces.enabled` | enables converters convert between Any type and specific implemented interfaces. | `true` |
| `interfaces.useUnionTypes` | Generate Any type as union types(TextProposal \| RegisterIncentiveProposal) instead of intersection types(TextProposal & RegisterIncentiveProposal). | `false` |

### Prototypes Options
Expand All @@ -281,8 +281,6 @@ telescope({
| `prototypes.allowUndefinedTypes` | boolean value allowing `Type`s to be `undefined` | `false` |
| `prototypes.optionalQueryParams` | boolean value setting queryParams to be optional | `false` |
| `prototypes.optionalPageRequests` | boolean value setting `PageRequest` fields to optional | `false` |
| `prototypes.addTypeUrlToDecoders` | Include typeUrl feild into decoders to indicate the original type. | `true` |
| `prototypes.addTypeUrlToObjects` | Include typeUrl feild into objects to indicate the original type | `true` |

### Prototypes Methods

Expand All @@ -295,10 +293,6 @@ telescope({
| `prototypes.methods.fromPartial` | boolean to enable `fromPartial` method on proto objects | `true` |
| `prototypes.methods.fromSDK` | boolean to enable `fromSDK` method on proto objects | `false` |
| `prototypes.methods.toSDK` | boolean to enable `toSDK` method on proto objects | `false` |
| `prototypes.methods.toAmino` | boolean to enable `toAmino` method on proto objects | `true` |
| `prototypes.methods.fromAmino` | boolean to enable `fromAmino` method on proto objects | `true` |
| `prototypes.methods.toProto` | boolean to enable `toProto` method on proto objects | `true` |
| `prototypes.methods.fromProto` | boolean to enable `fromProto` method on proto objects | `true` |

### LCD Client Options

Expand Down Expand Up @@ -369,7 +363,7 @@ See [RPC Clients](#rpc-clients) for more info.
| ----------------------------------------- | -------------------------------------------------------------- | --------- |
| `prototypes.typingsFormat.customTypes.useCosmosSDKDec` | enable handling "prototypes.typingsFormat.customTypes.useCosmosSDKDec" proto custom type. Used to show decimal fields with the custom type correctly. Highly recommend set to true. | `true` |
| `prototypes.typingsFormat.num64` | 'long' or 'bigint', the way of generating int64 proto types, set to 'bigint' to enable using more stable built-in type | `bigint` |
| `prototypes.typingsFormat.useDeepPartial` | By default using the `Partial` TS type, otherwise using `DeepPartial` | `false` |
| `prototypes.typingsFormat.useDeepPartial` | defaults to true, but if disabled uses the `Partial` TS type | `false` |
| `prototypes.typingsFormat.useExact` | defaults to false, but if enabled uses the `Exact` TS type | `false` |
| `prototypes.typingsFormat.timestamp` | use either `date` or `timestamp` for `Timestamp` proto type | "date" |
| `prototypes.typingsFormat.duration` | use either `duration` or `string` for `Duration` proto type | "duration"|
Expand Down Expand Up @@ -414,7 +408,6 @@ See [RPC Clients](#rpc-clients) for more info.
| `removeUnusedImports` | removes unused imports | `true` |
| `classesUseArrowFunctions` | classes use arrow functions instead of `bind()`ing in constructors | `false` |
| `includeExternalHelpers` | exports a few helpers functions in `extern.ts` | `false` |
| `interfaces.enabled` | Enable handling accepts_interface to decode or encode fields that can be multiple types | `true` |

## Types

Expand Down
2 changes: 2 additions & 0 deletions __fixtures__/misc/output/google/api/expr/v1alpha1/eval.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ function createBaseExprValue(): ExprValue {
};
}
export const ExprValue = {
typeUrl: "/google.api.expr.v1alpha1.ExprValue",
encode(message: ExprValue, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
for (const v of message.exprs) {
IdRef.encode(v!, writer.uint32(10).fork()).ldelim();
Expand Down Expand Up @@ -142,6 +143,7 @@ function createBaseIdRef(): IdRef {
};
}
export const IdRef = {
typeUrl: "/google.api.expr.v1alpha1.IdRef",
encode(message: IdRef, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
if (message.id !== 0) {
writer.uint32(8).int32(message.id);
Expand Down
1 change: 1 addition & 0 deletions __fixtures__/misc/output/misc/eval_request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@ function createBaseEvalRequest(): EvalRequest {
};
}
export const EvalRequest = {
typeUrl: "/misc.EvalRequest",
encode(message: EvalRequest, writer: BinaryWriter = BinaryWriter.create()): BinaryWriter {
Object.entries(message.bindings).forEach(([key, value]) => {
EvalRequest_BindingsEntry.encode({
Expand Down
Loading

0 comments on commit f2f9db3

Please sign in to comment.