@chainflip/utils 2.1.7-tron-dev.2 → 2.2.0-tron-dev.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/dist/tron.cjs ADDED
@@ -0,0 +1,15 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_base58 = require('./base58.cjs');
3
+
4
+ //#region src/tron.ts
5
+ const isValidTronAddress = (address) => {
6
+ try {
7
+ if (!address.startsWith("T")) return false;
8
+ return require_base58.decode(address).length === 25;
9
+ } catch {
10
+ return false;
11
+ }
12
+ };
13
+
14
+ //#endregion
15
+ exports.isValidTronAddress = isValidTronAddress;
@@ -0,0 +1,4 @@
1
+ //#region src/tron.d.ts
2
+ declare const isValidTronAddress: (address: string) => boolean;
3
+ //#endregion
4
+ export { isValidTronAddress };
@@ -0,0 +1,4 @@
1
+ //#region src/tron.d.ts
2
+ declare const isValidTronAddress: (address: string) => boolean;
3
+ //#endregion
4
+ export { isValidTronAddress };
package/dist/tron.mjs ADDED
@@ -0,0 +1,14 @@
1
+ import { decode } from "./base58.mjs";
2
+
3
+ //#region src/tron.ts
4
+ const isValidTronAddress = (address) => {
5
+ try {
6
+ if (!address.startsWith("T")) return false;
7
+ return decode(address).length === 25;
8
+ } catch {
9
+ return false;
10
+ }
11
+ };
12
+
13
+ //#endregion
14
+ export { isValidTronAddress };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chainflip/utils",
3
- "version": "2.1.7-tron-dev.2",
3
+ "version": "2.2.0-tron-dev.3",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",