@hyperweb/telescope 1.15.1 → 1.15.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +34 -0
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -54,12 +54,14 @@ The following blockchain libraries (generated by Telescope) are available via np
54
54
  - [Usage](#usage)
55
55
  - [Programmatic Usage](#programmatic-usage)
56
56
  - [Options](#options)
57
+ - [General Options](#general-options)
57
58
  - [Amino Encoding](#amino-encoding)
58
59
  - [Implemented Interface Options](#implemented-interface-options)
59
60
  - [Prototypes Options](#prototypes-options)
60
61
  - [Prototypes Methods](#prototypes-methods)
61
62
  - [Enums Options](#enums-options)
62
63
  - [LCD Client Options](#lcd-client-options)
64
+ - [Aggregated LCD](#aggregated-lcd)
63
65
  - [RPC Client Options](#rpc-client-options)
64
66
  - [Helper Functions](#helper-functions)
65
67
  - [Stargate Client Options](#stargate-client-options)
@@ -496,12 +498,26 @@ telescope({
496
498
 
497
499
  ## Options
498
500
 
501
+ ### General Options
502
+
503
+ | option | description | defaults |
504
+ | ------------------------------ | -------------------------------------------------------------- | ---------- |
505
+ | `useInterchainJs` | Use InterchainJS for signing clients instead of CosmJS | `false` |
506
+ | `removeUnusedImports` | Remove unused imports from generated files | `true` |
507
+ | `classesUseArrowFunctions` | Use arrow functions for class methods | `false` |
508
+ | `useSDKTypes` | Use Cosmos SDK types (like Dec) instead of native types | `true` |
509
+ | `includeExternalHelpers` | Include external helper functions | `false` |
510
+ | `restoreImportExtension` | Restore extensions of imported paths (e.g., '.js'). null means no extension | `null` |
511
+ | `readme.enabled` | Generate README files | `false` |
512
+ | `logLevel` | Logging level (0=None, 1=Info, 2=Warn, 3=Error, 4=Debug) | `0` |
513
+
499
514
  ### Amino Encoding
500
515
 
501
516
  | option | description | defaults |
502
517
  | ------------------------------ | -------------------------------------------------------------- | ---------- |
503
518
  | `aminoEncoding.enabled` | Generate amino types and amino converters | `true` |
504
519
  | `aminoEncoding.omitEmptyTags` | Array of strings that determines whether a field should be omitted when serialized to JSON. If the array includes "omitempty", any field with the "omitempty" option in either gogoproto.jsontag or cosmos_proto.json_tag will be omitted. If the array includes "dont_omitempty", the field will be omitted or not based on the value of "(amino.dont_omitempty)": if it's null or false, the field will be omitted; if it's true, the field will not be omitted. | `["omitempty", "dont_omitempty"]` |
520
+ | `aminoEncoding.useProtoOptionality` | Use proto optionality for determining required fields | `false` |
505
521
  | `aminoEncoding.disableMsgTypes` | Disable generating AminoMsg types | `false` |
506
522
  | `aminoEncoding.casingFn` | Set the amino-casing function for a project | `snake()` |
507
523
  | `aminoEncoding.exceptions` | Set specific aminoType name exceptions | see code |
@@ -517,6 +533,7 @@ telescope({
517
533
  | ----------------------------------------- | -------------------------------------------------------------- | ---------- |
518
534
  | `interfaces.enabled` | Enable converters between Any type and specific implemented interfaces | `true` |
519
535
  | `interfaces.useGlobalDecoderRegistry` | Enable GlobalDecoderRegistry and related functions. Highly recommended when dealing with fields with 'accepted_interface' option. See 'packages/telescope/__tests__/impl-interfaces.test.ts' for usage. | `false` |
536
+ | `interfaces.registerAllDecodersToGlobal` | Automatically register all decoders to the global registry | `true` |
520
537
  | `interfaces.useUseInterfacesParams` | Add `useInterfaces` argument to `decode` and `toAmino` functions | `false` |
521
538
  | `interfaces.useByDefault` | Use interface decoders by default (default for `useInterfaces` argument to `decode` and `toAmino` functions) | `true` |
522
539
  | `interfaces.useByDefaultRpc` | Use interface decoders by default in RPC clients | `true` |
@@ -544,6 +561,8 @@ telescope({
544
561
  | `prototypes.addTypeUrlToDecoders` | Add $typeUrl field to generated interfaces | `true` |
545
562
  | `prototypes.addAminoTypeToObjects` | Add aminoType field to generated Decoders | `false` |
546
563
  | `prototypes.addTypeUrlToObjects` | Add typeUrl field to generated Decoders | `true` |
564
+ | `prototypes.strictNullCheckForPrototypeMethods` | Enable strict null checks for prototype methods | `false` |
565
+ | `prototypes.paginationDefaultFromPartial` | Set default values for pagination in fromPartial methods | `false` |
547
566
  | `prototypes.enableRegistryLoader` | Generate Registry loader in *.registry.ts files | `true` |
548
567
  | `prototypes.enableMessageComposer` | Generate MessageComposer in *.registry.ts files | `true` |
549
568
  | `prototypes.patch` | Object mapping filenames to an array of `Operation` to be applied as patches to proto files during generation. See [JSON Patch Protos](#json-patch-protos) | `undefined` |
@@ -578,6 +597,16 @@ telescope({
578
597
 
579
598
  See [LCD Clients](#lcd-clients) for more info.
580
599
 
600
+ ### Aggregated LCD
601
+
602
+ | option | description | defaults |
603
+ | ------------------------------ | -------------------------------------------------------------- | ---------- |
604
+ | `aggregatedLCD.dir` | Directory to place aggregated LCD client file | `undefined`|
605
+ | `aggregatedLCD.filename` | Filename for aggregated LCD client | `undefined`|
606
+ | `aggregatedLCD.packages` | Packages to include in aggregated LCD client | `[]` |
607
+ | `aggregatedLCD.protos` | Proto files to include in aggregated LCD client | `[]` |
608
+ | `aggregatedLCD.addToBundle` | Add aggregated LCD client to bundle | `false` |
609
+
581
610
  ### RPC Client Options
582
611
 
583
612
  | option | description | defaults |
@@ -585,6 +614,8 @@ See [LCD Clients](#lcd-clients) for more info.
585
614
  | `rpcClients.type` | Generate this type of RPC client (`tendermint`, `gRPC-web`, `gRPC`)| `tendermint` |
586
615
  | `rpcClients.enabled` | Generate RPC clients that can interact with proto messages | `true` |
587
616
  | `rpcClients.bundle` | Generate factory bundle aggregate of all RPC Clients | `true` |
617
+ | `rpcClients.inline` | Inline all RPC client methods into a single file | `false` |
618
+ | `rpcClients.extensions` | Enable extensions for RPC clients | `true` |
588
619
  | `rpcClients.camelCase` | Use camel-case for RPC methods when generating RPC clients | `true` |
589
620
  | `rpcClients.scoped` | Generate factory of scoped RPC Clients | `undefined` |
590
621
  | `rpcClients.scopedIsExclusive` | Allow both scoped bundles and all RPC Clients | `true` |
@@ -607,6 +638,7 @@ See [RPC Clients](#rpc-clients) for more info.
607
638
  | Option | Description | Defaults |
608
639
  | --------------------------------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------- |
609
640
  | `helperFunctions.enabled` | Enable the generation of helper function files `.func.ts` | `false` |
641
+ | `helperFunctions.useGlobalDecoderRegistry` | Use global decoder registry in helper functions | `false` |
610
642
  | `helperFunctions.hooks` | Generates hooks selected alongside helper functions | `{ react: false, vue: false }` |
611
643
  | `helperFunctions.include.serviceTypes`| Specifies which types of services to include (`Query`, `Msg`). `undefined` includes all types. | `undefined` |
612
644
  | `helperFunctions.include.patterns` | Array of glob patterns patterns (e.g., `"**"`, `"cosmos.bank.v1beta1.bala*"`, etc.) to match specific proto services. | `undefined` |
@@ -680,6 +712,7 @@ See [Helper Functions Configuration](#helper-functions-configuration) for more i
680
712
  | `prototypes.typingsFormat.toJsonUnknown` | Use `any` for `toJSON` methods instead of `JsonSafe` | `true` |
681
713
  | `prototypes.typingsFormat.timestamp` | Use either `date` or `timestamp` for `Timestamp` proto type | "date" |
682
714
  | `prototypes.typingsFormat.duration` | Use either `duration` or `string` for `Duration` proto type | "duration"|
715
+ | `prototypes.typingsFormat.updatedDuration` | temporary field to avoid breaking changes | `false` |
683
716
  | `prototypes.typingsFormat.setDefaultEnumToUnrecognized` | false: enum empty value would be 0, true: -1 (value for enum unrecognized) |`true`|
684
717
  | `prototypes.typingsFormat.setDefaultCustomTypesToUndefined` | true: Timestamp, Duration, Any, Coin empty value would be undefined. false: use fromPartial to get an empty object |`false`|
685
718
  | `prototypes.typingsFormat.autoFixUndefinedEnumDefault` | The default value of an enum field would be: 1 (proto2); 0 (proto3). But in some rare cases, those default values don't exist. By enabling this, the default value will be automatically fixed with the smallest value inside the enum. |`false`|
@@ -713,6 +746,7 @@ See [Helper Functions Configuration](#helper-functions-configuration) for more i
713
746
  | option | description | defaults |
714
747
  | ------------------------------ | -------------------------------------------------------------- | ---------- |
715
748
  | `bundle.enabled` | Bundle all files into a scoped index file | `true` |
749
+ | `bundle.type` | Bundle type: "namespace" or "module" | `"namespace"` |
716
750
  > **Warning:** This option is not recommended. It will generate a bundle file that exports all the types and functions under one namespace. This will make the bundle file very large and hard to maintain. e.g. using `cosmos.bank.v1beta1.MsgSend` might be intuitive, but it will also include `cosmos.gov.v1beta1.*` and other types in the final bundle file. So use this option with caution.
717
751
 
718
752
  ### MCP Server
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperweb/telescope",
3
- "version": "1.15.1",
3
+ "version": "1.15.2",
4
4
  "description": "A TypeScript Transpiler for Cosmos Protobufs",
5
5
  "author": "Dan Lynch <pyramation@gmail.com>",
6
6
  "homepage": "https://github.com/hyperweb-io/telescope/tree/master/packages/telescope#readme",
@@ -90,10 +90,10 @@
90
90
  "@babel/parser": "^7.23.6",
91
91
  "@babel/traverse": "7.23.6",
92
92
  "@babel/types": "7.23.6",
93
- "@cosmology/ast": "^1.11.1",
94
- "@cosmology/proto-parser": "^1.10.9",
95
- "@cosmology/types": "^1.12.5",
96
- "@cosmology/utils": "^1.10.7",
93
+ "@cosmology/ast": "^1.11.2",
94
+ "@cosmology/proto-parser": "^1.10.10",
95
+ "@cosmology/types": "^1.12.6",
96
+ "@cosmology/utils": "^1.10.8",
97
97
  "@cosmwasm/ts-codegen": "0.35.7",
98
98
  "@types/parse-package-name": "0.1.0",
99
99
  "case": "1.6.3",
@@ -111,5 +111,5 @@
111
111
  "rimraf": "5.0.0",
112
112
  "yaml": "^2.3.4"
113
113
  },
114
- "gitHead": "475bc657513080635838a7f0a7d21b0cf412955b"
114
+ "gitHead": "47f7e41efbcf1fed47d33fe22a105efc799cf91b"
115
115
  }