@hyperweb/telescope 1.17.1 → 1.17.3
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.
- package/main/generators/create-bundle.js +8 -14
- package/main/generators/create-root-readme.js +58 -43
- package/main/helpers/helper-func-types-interface.js +2 -2
- package/main/helpers/helper-func-types.js +2 -2
- package/main/helpers/internal-for-bigint.js +4 -3
- package/main/helpers/internal.js +4 -2
- package/main/helpers/react-query-hooks-icjs.js +1 -1
- package/module/generators/create-bundle.js +9 -15
- package/module/generators/create-root-readme.js +58 -43
- package/module/helpers/helper-func-types-interface.js +2 -2
- package/module/helpers/helper-func-types.js +2 -2
- package/module/helpers/internal-for-bigint.js +4 -3
- package/module/helpers/internal.js +4 -2
- package/module/helpers/react-query-hooks-icjs.js +1 -1
- package/package.json +2 -2
- package/src/generators/create-bundle.ts +24 -20
- package/src/generators/create-root-readme.ts +358 -271
- package/src/helpers/helper-func-types-interface.ts +2 -2
- package/src/helpers/helper-func-types.ts +2 -2
- package/src/helpers/internal-for-bigint.ts +4 -2
- package/src/helpers/internal.ts +4 -1
- package/src/helpers/react-query-hooks-icjs.ts +1 -1
|
@@ -7,8 +7,8 @@ import { BinaryReader, BinaryWriter } from "./binary${options.restoreImportExten
|
|
|
7
7
|
import { getRpcClient } from "./extern${options.restoreImportExtension ?? ""}";` : ''}
|
|
8
8
|
import { isRpc, Rpc } from "./helpers${options.restoreImportExtension ?? ""}";${!options.isGeneratingCosmosTypes ? `
|
|
9
9
|
import { TelescopeGeneratedCodec, DeliverTxResponse, Message, StdFee } from "./types${options.restoreImportExtension ?? ""}";` : ''}${!options.isGeneratingCosmosTypes ? `
|
|
10
|
-
import { toConverters, toEncoders } from "@interchainjs/cosmos
|
|
11
|
-
import { ISigningClient } from "@interchainjs/cosmos
|
|
10
|
+
import { toConverters, toEncoders } from "@interchainjs/cosmos";
|
|
11
|
+
import { ISigningClient } from "@interchainjs/cosmos";` : ''}
|
|
12
12
|
|
|
13
13
|
export interface QueryBuilderOptions<TReq, TRes> {
|
|
14
14
|
encode: (request: TReq, writer?: BinaryWriter) => BinaryWriter
|
|
@@ -7,8 +7,8 @@ import { BinaryReader, BinaryWriter } from "./binary${options.restoreImportExten
|
|
|
7
7
|
import { getRpcClient } from "./extern${options.restoreImportExtension ?? ""}";` : ''}
|
|
8
8
|
import { isRpc, Rpc } from "./helpers${options.restoreImportExtension ?? ""}";${!options.isGeneratingCosmosTypes ? `
|
|
9
9
|
import { TelescopeGeneratedCodec, DeliverTxResponse, Message, StdFee } from "./types${options.restoreImportExtension ?? ""}";` : ''}${!options.isGeneratingCosmosTypes ? `
|
|
10
|
-
import { toConverters, toEncoders } from "@interchainjs/cosmos
|
|
11
|
-
import { ISigningClient } from "@interchainjs/cosmos
|
|
10
|
+
import { toConverters, toEncoders } from "@interchainjs/cosmos";
|
|
11
|
+
import { ISigningClient } from "@interchainjs/cosmos";` : ''}
|
|
12
12
|
|
|
13
13
|
export interface QueryBuilderOptions<TReq, TRes> {
|
|
14
14
|
encode: (request: TReq, writer?: BinaryWriter) => BinaryWriter
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { TelescopeOptions } from "@cosmology/types";
|
|
2
2
|
|
|
3
3
|
export const getHelperForBigint = (options: TelescopeOptions) => {
|
|
4
|
-
return
|
|
5
|
-
|
|
4
|
+
return `${options.useInterchainJs ?
|
|
5
|
+
'export { fromBase64 as bytesFromBase64, toBase64 as base64FromBytes } from \'@interchainjs/encoding\';' :
|
|
6
|
+
`declare var self: any | undefined;
|
|
6
7
|
declare var window: any | undefined;
|
|
7
8
|
declare var global: any | undefined;
|
|
8
9
|
var globalThis: any = (() => {
|
|
@@ -36,6 +37,7 @@ export function base64FromBytes(arr: Uint8Array): string {
|
|
|
36
37
|
bin.push(String.fromCharCode(byte));
|
|
37
38
|
});
|
|
38
39
|
return btoa(bin.join(''));
|
|
40
|
+
}`
|
|
39
41
|
}
|
|
40
42
|
|
|
41
43
|
export interface AminoHeight {
|
package/src/helpers/internal.ts
CHANGED
|
@@ -13,7 +13,9 @@ if (_m0.util.Long !== Long) {
|
|
|
13
13
|
|
|
14
14
|
export { Long };
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
${options.useInterchainJs ?
|
|
17
|
+
'export { fromBase64 as bytesFromBase64, toBase64 as base64FromBytes } from \'@interchainjs/encoding\';' :
|
|
18
|
+
`declare var self: any | undefined;
|
|
17
19
|
declare var window: any | undefined;
|
|
18
20
|
declare var global: any | undefined;
|
|
19
21
|
var globalThis: any = (() => {
|
|
@@ -45,6 +47,7 @@ export function base64FromBytes(arr: Uint8Array): string {
|
|
|
45
47
|
bin.push(String.fromCharCode(byte));
|
|
46
48
|
});
|
|
47
49
|
return btoa(bin.join(''));
|
|
50
|
+
}`
|
|
48
51
|
}
|
|
49
52
|
|
|
50
53
|
export interface AminoHeight {
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
ITxArgs,
|
|
12
12
|
EndpointOrRpc,
|
|
13
13
|
} from './helper-func-types${options.restoreImportExtension ?? ""}'
|
|
14
|
-
import { ISigningClient, isISigningClient } from "@interchainjs/cosmos
|
|
14
|
+
import { ISigningClient, isISigningClient } from "@interchainjs/cosmos";
|
|
15
15
|
import {
|
|
16
16
|
StdFee,
|
|
17
17
|
DeliverTxResponse,
|