@b3dotfun/sdk 0.0.7-alpha.27 → 0.0.7-alpha.28

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.
@@ -0,0 +1 @@
1
+ export declare function formatUsername(username: string): string;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.formatUsername = formatUsername;
4
+ function formatUsername(username) {
5
+ // Remove .b3.fun and put an @ before it
6
+ // Make it all lowercase
7
+ return `@${username.replace(".b3.fun", "").toLowerCase()}`;
8
+ }
@@ -1,11 +1,4 @@
1
- export declare function formatUsername(username: string): string;
2
- /**
3
- * Helper functions for formatting data
4
- */
5
- /**
6
- * Truncates a wallet address to show first 4 and last 4 characters
7
- * @param address Wallet address to truncate
8
- * @returns Truncated address in format "0x1234...5678"
9
- */
10
- export declare const truncateAddress: (address: string) => string;
11
1
  export * from "./cn";
2
+ export * from "./formatNumber";
3
+ export * from "./formatUsername";
4
+ export * from "./truncateAddress";
@@ -14,27 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.truncateAddress = void 0;
18
- exports.formatUsername = formatUsername;
19
- function formatUsername(username) {
20
- // Remove .b3.fun and put an @ before it
21
- // Make it all lowercase
22
- return `@${username.replace(".b3.fun", "").toLowerCase()}`;
23
- }
24
- /**
25
- * Helper functions for formatting data
26
- */
27
- /**
28
- * Truncates a wallet address to show first 4 and last 4 characters
29
- * @param address Wallet address to truncate
30
- * @returns Truncated address in format "0x1234...5678"
31
- */
32
- const truncateAddress = (address) => {
33
- if (!address)
34
- return "";
35
- if (address.length <= 9)
36
- return address;
37
- return `${address.slice(0, 6)}...${address.slice(-4)}`;
38
- };
39
- exports.truncateAddress = truncateAddress;
17
+ // Export utility functions
40
18
  __exportStar(require("./cn"), exports);
19
+ __exportStar(require("./formatNumber"), exports);
20
+ __exportStar(require("./formatUsername"), exports);
21
+ __exportStar(require("./truncateAddress"), exports);
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Truncates a wallet address to show first 4 and last 4 characters
3
+ * @param address Wallet address to truncate
4
+ * @returns Truncated address in format "0x1234...5678"
5
+ */
6
+ export declare const truncateAddress: (address: string) => string;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.truncateAddress = void 0;
4
+ /**
5
+ * Truncates a wallet address to show first 4 and last 4 characters
6
+ * @param address Wallet address to truncate
7
+ * @returns Truncated address in format "0x1234...5678"
8
+ */
9
+ const truncateAddress = (address) => {
10
+ if (!address)
11
+ return "";
12
+ if (address.length <= 9)
13
+ return address;
14
+ return `${address.slice(0, 6)}...${address.slice(-4)}`;
15
+ };
16
+ exports.truncateAddress = truncateAddress;
@@ -0,0 +1 @@
1
+ export declare function formatUsername(username: string): string;
@@ -0,0 +1,5 @@
1
+ export function formatUsername(username) {
2
+ // Remove .b3.fun and put an @ before it
3
+ // Make it all lowercase
4
+ return `@${username.replace(".b3.fun", "").toLowerCase()}`;
5
+ }
@@ -1,11 +1,4 @@
1
- export declare function formatUsername(username: string): string;
2
- /**
3
- * Helper functions for formatting data
4
- */
5
- /**
6
- * Truncates a wallet address to show first 4 and last 4 characters
7
- * @param address Wallet address to truncate
8
- * @returns Truncated address in format "0x1234...5678"
9
- */
10
- export declare const truncateAddress: (address: string) => string;
11
1
  export * from "./cn";
2
+ export * from "./formatNumber";
3
+ export * from "./formatUsername";
4
+ export * from "./truncateAddress";
@@ -1,21 +1,5 @@
1
- export function formatUsername(username) {
2
- // Remove .b3.fun and put an @ before it
3
- // Make it all lowercase
4
- return `@${username.replace(".b3.fun", "").toLowerCase()}`;
5
- }
6
- /**
7
- * Helper functions for formatting data
8
- */
9
- /**
10
- * Truncates a wallet address to show first 4 and last 4 characters
11
- * @param address Wallet address to truncate
12
- * @returns Truncated address in format "0x1234...5678"
13
- */
14
- export const truncateAddress = (address) => {
15
- if (!address)
16
- return "";
17
- if (address.length <= 9)
18
- return address;
19
- return `${address.slice(0, 6)}...${address.slice(-4)}`;
20
- };
1
+ // Export utility functions
21
2
  export * from "./cn.js";
3
+ export * from "./formatNumber.js";
4
+ export * from "./formatUsername.js";
5
+ export * from "./truncateAddress.js";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Truncates a wallet address to show first 4 and last 4 characters
3
+ * @param address Wallet address to truncate
4
+ * @returns Truncated address in format "0x1234...5678"
5
+ */
6
+ export declare const truncateAddress: (address: string) => string;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Truncates a wallet address to show first 4 and last 4 characters
3
+ * @param address Wallet address to truncate
4
+ * @returns Truncated address in format "0x1234...5678"
5
+ */
6
+ export const truncateAddress = (address) => {
7
+ if (!address)
8
+ return "";
9
+ if (address.length <= 9)
10
+ return address;
11
+ return `${address.slice(0, 6)}...${address.slice(-4)}`;
12
+ };
@@ -0,0 +1 @@
1
+ export declare function formatUsername(username: string): string;
@@ -1,11 +1,4 @@
1
- export declare function formatUsername(username: string): string;
2
- /**
3
- * Helper functions for formatting data
4
- */
5
- /**
6
- * Truncates a wallet address to show first 4 and last 4 characters
7
- * @param address Wallet address to truncate
8
- * @returns Truncated address in format "0x1234...5678"
9
- */
10
- export declare const truncateAddress: (address: string) => string;
11
1
  export * from "./cn";
2
+ export * from "./formatNumber";
3
+ export * from "./formatUsername";
4
+ export * from "./truncateAddress";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Truncates a wallet address to show first 4 and last 4 characters
3
+ * @param address Wallet address to truncate
4
+ * @returns Truncated address in format "0x1234...5678"
5
+ */
6
+ export declare const truncateAddress: (address: string) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@b3dotfun/sdk",
3
- "version": "0.0.7-alpha.27",
3
+ "version": "0.0.7-alpha.28",
4
4
  "source": "src/index.ts",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "react-native": "./dist/cjs/index.native.js",
@@ -0,0 +1,5 @@
1
+ export function formatUsername(username: string) {
2
+ // Remove .b3.fun and put an @ before it
3
+ // Make it all lowercase
4
+ return `@${username.replace(".b3.fun", "").toLowerCase()}`;
5
+ }
@@ -1,23 +1,5 @@
1
- export function formatUsername(username: string) {
2
- // Remove .b3.fun and put an @ before it
3
- // Make it all lowercase
4
- return `@${username.replace(".b3.fun", "").toLowerCase()}`;
5
- }
6
-
7
- /**
8
- * Helper functions for formatting data
9
- */
10
-
11
- /**
12
- * Truncates a wallet address to show first 4 and last 4 characters
13
- * @param address Wallet address to truncate
14
- * @returns Truncated address in format "0x1234...5678"
15
- */
16
- export const truncateAddress = (address: string): string => {
17
- if (!address) return "";
18
- if (address.length <= 9) return address;
19
-
20
- return `${address.slice(0, 6)}...${address.slice(-4)}`;
21
- };
22
-
1
+ // Export utility functions
23
2
  export * from "./cn";
3
+ export * from "./formatNumber";
4
+ export * from "./formatUsername";
5
+ export * from "./truncateAddress";
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Truncates a wallet address to show first 4 and last 4 characters
3
+ * @param address Wallet address to truncate
4
+ * @returns Truncated address in format "0x1234...5678"
5
+ */
6
+ export const truncateAddress = (address: string): string => {
7
+ if (!address) return "";
8
+ if (address.length <= 9) return address;
9
+
10
+ return `${address.slice(0, 6)}...${address.slice(-4)}`;
11
+ };