@hyperweb/telescope 1.17.1 → 1.17.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.
@@ -2,8 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getHelperForBigint = void 0;
4
4
  const getHelperForBigint = (options) => {
5
- return `
6
- declare var self: any | undefined;
5
+ return `${options.useInterchainJs ?
6
+ 'export { fromBase64 as bytesFromBase64, toBase64 as base64FromBytes } from \'@interchainjs/encoding/base64\';' :
7
+ `declare var self: any | undefined;
7
8
  declare var window: any | undefined;
8
9
  declare var global: any | undefined;
9
10
  var globalThis: any = (() => {
@@ -37,7 +38,7 @@ export function base64FromBytes(arr: Uint8Array): string {
37
38
  bin.push(String.fromCharCode(byte));
38
39
  });
39
40
  return btoa(bin.join(''));
40
- }
41
+ }`}
41
42
 
42
43
  export interface AminoHeight {
43
44
  readonly revision_number?: string;
@@ -14,7 +14,9 @@ if (_m0.util.Long !== Long) {
14
14
 
15
15
  export { Long };
16
16
 
17
- declare var self: any | undefined;
17
+ ${options.useInterchainJs ?
18
+ 'export { fromBase64 as bytesFromBase64, toBase64 as base64FromBytes } from \'@interchainjs/encoding/base64\';' :
19
+ `declare var self: any | undefined;
18
20
  declare var window: any | undefined;
19
21
  declare var global: any | undefined;
20
22
  var globalThis: any = (() => {
@@ -46,7 +48,7 @@ export function base64FromBytes(arr: Uint8Array): string {
46
48
  bin.push(String.fromCharCode(byte));
47
49
  });
48
50
  return btoa(bin.join(''));
49
- }
51
+ }`}
50
52
 
51
53
  export interface AminoHeight {
52
54
  readonly revision_number?: string;
@@ -1,6 +1,7 @@
1
1
  export const getHelperForBigint = (options) => {
2
- return `
3
- declare var self: any | undefined;
2
+ return `${options.useInterchainJs ?
3
+ 'export { fromBase64 as bytesFromBase64, toBase64 as base64FromBytes } from \'@interchainjs/encoding/base64\';' :
4
+ `declare var self: any | undefined;
4
5
  declare var window: any | undefined;
5
6
  declare var global: any | undefined;
6
7
  var globalThis: any = (() => {
@@ -34,7 +35,7 @@ export function base64FromBytes(arr: Uint8Array): string {
34
35
  bin.push(String.fromCharCode(byte));
35
36
  });
36
37
  return btoa(bin.join(''));
37
- }
38
+ }`}
38
39
 
39
40
  export interface AminoHeight {
40
41
  readonly revision_number?: string;
@@ -11,7 +11,9 @@ if (_m0.util.Long !== Long) {
11
11
 
12
12
  export { Long };
13
13
 
14
- declare var self: any | undefined;
14
+ ${options.useInterchainJs ?
15
+ 'export { fromBase64 as bytesFromBase64, toBase64 as base64FromBytes } from \'@interchainjs/encoding/base64\';' :
16
+ `declare var self: any | undefined;
15
17
  declare var window: any | undefined;
16
18
  declare var global: any | undefined;
17
19
  var globalThis: any = (() => {
@@ -43,7 +45,7 @@ export function base64FromBytes(arr: Uint8Array): string {
43
45
  bin.push(String.fromCharCode(byte));
44
46
  });
45
47
  return btoa(bin.join(''));
46
- }
48
+ }`}
47
49
 
48
50
  export interface AminoHeight {
49
51
  readonly revision_number?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperweb/telescope",
3
- "version": "1.17.1",
3
+ "version": "1.17.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",
@@ -111,5 +111,5 @@
111
111
  "rimraf": "5.0.0",
112
112
  "yaml": "^2.3.4"
113
113
  },
114
- "gitHead": "264734b693e5e98c4601799b56c84221d2a992fa"
114
+ "gitHead": "40a4298beb51c0a2f7bfb5d44c53c5c49d121632"
115
115
  }
@@ -1,8 +1,9 @@
1
1
  import { TelescopeOptions } from "@cosmology/types";
2
2
 
3
3
  export const getHelperForBigint = (options: TelescopeOptions) => {
4
- return `
5
- declare var self: any | undefined;
4
+ return `${options.useInterchainJs ?
5
+ 'export { fromBase64 as bytesFromBase64, toBase64 as base64FromBytes } from \'@interchainjs/encoding/base64\';' :
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 {
@@ -13,7 +13,9 @@ if (_m0.util.Long !== Long) {
13
13
 
14
14
  export { Long };
15
15
 
16
- declare var self: any | undefined;
16
+ ${options.useInterchainJs ?
17
+ 'export { fromBase64 as bytesFromBase64, toBase64 as base64FromBytes } from \'@interchainjs/encoding/base64\';' :
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 {