dacty-launch 1.4.2 → 1.4.4
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/bin/dacty-launch.mjs +18 -4
- package/lib/index.mjs +18 -4
- package/package.json +6 -4
package/bin/dacty-launch.mjs
CHANGED
|
@@ -9,6 +9,18 @@ import { createWalletClient, createPublicClient, http } from 'viem';
|
|
|
9
9
|
import { privateKeyToAccount } from 'viem/accounts';
|
|
10
10
|
import { base } from 'viem/chains';
|
|
11
11
|
|
|
12
|
+
// Polyfill fetch for Node.js if not available
|
|
13
|
+
if (typeof globalThis.fetch === 'undefined') {
|
|
14
|
+
try {
|
|
15
|
+
const fetch = await import('node-fetch').then(m => m.default);
|
|
16
|
+
globalThis.fetch = fetch;
|
|
17
|
+
} catch (e) {
|
|
18
|
+
// Fallback: use undici if node-fetch not available
|
|
19
|
+
const { fetch: undiciFetch } = await import('undici');
|
|
20
|
+
globalThis.fetch = undiciFetch;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
12
24
|
const __filename = fileURLToPath(import.meta.url);
|
|
13
25
|
const __dirname = path.dirname(__filename);
|
|
14
26
|
|
|
@@ -87,10 +99,12 @@ async function main() {
|
|
|
87
99
|
process.exit(1);
|
|
88
100
|
}
|
|
89
101
|
|
|
90
|
-
// Parse private key: remove quotes, trim whitespace
|
|
91
|
-
let privateKey = privateKeyMatch[1]
|
|
92
|
-
|
|
93
|
-
|
|
102
|
+
// Parse private key: remove quotes, newlines, and trim whitespace
|
|
103
|
+
let privateKey = privateKeyMatch[1]
|
|
104
|
+
.trim() // Remove leading/trailing whitespace
|
|
105
|
+
.replace(/\r?\n/g, '') // Remove newlines
|
|
106
|
+
.replace(/^["']|["']$/g, '') // Remove surrounding quotes
|
|
107
|
+
.trim(); // Trim again after removing quotes
|
|
94
108
|
console.log('✓ Private key loaded from .env\n');
|
|
95
109
|
|
|
96
110
|
// Get token details from user
|
package/lib/index.mjs
CHANGED
|
@@ -9,6 +9,18 @@ import { createWalletClient, createPublicClient, http } from 'viem';
|
|
|
9
9
|
import { privateKeyToAccount } from 'viem/accounts';
|
|
10
10
|
import { base } from 'viem/chains';
|
|
11
11
|
|
|
12
|
+
// Polyfill fetch for Node.js if not available
|
|
13
|
+
if (typeof globalThis.fetch === 'undefined') {
|
|
14
|
+
try {
|
|
15
|
+
const fetch = await import('node-fetch').then(m => m.default);
|
|
16
|
+
globalThis.fetch = fetch;
|
|
17
|
+
} catch (e) {
|
|
18
|
+
// Fallback: use undici if node-fetch not available
|
|
19
|
+
const { fetch: undiciFetch } = await import('undici');
|
|
20
|
+
globalThis.fetch = undiciFetch;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
12
24
|
const __filename = fileURLToPath(import.meta.url);
|
|
13
25
|
const __dirname = path.dirname(__filename);
|
|
14
26
|
|
|
@@ -87,10 +99,12 @@ async function main() {
|
|
|
87
99
|
process.exit(1);
|
|
88
100
|
}
|
|
89
101
|
|
|
90
|
-
// Parse private key: remove quotes, trim whitespace
|
|
91
|
-
let privateKey = privateKeyMatch[1]
|
|
92
|
-
|
|
93
|
-
|
|
102
|
+
// Parse private key: remove quotes, newlines, and trim whitespace
|
|
103
|
+
let privateKey = privateKeyMatch[1]
|
|
104
|
+
.trim() // Remove leading/trailing whitespace
|
|
105
|
+
.replace(/\r?\n/g, '') // Remove newlines
|
|
106
|
+
.replace(/^["']|["']$/g, '') // Remove surrounding quotes
|
|
107
|
+
.trim(); // Trim again after removing quotes
|
|
94
108
|
console.log('✓ Private key loaded from .env\n');
|
|
95
109
|
|
|
96
110
|
// Get token details from user
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dacty-launch",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.4",
|
|
4
4
|
"description": "Launch tokens for agents in the Dactyclaw ecosystem",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -21,12 +21,14 @@
|
|
|
21
21
|
"author": "Dactyclaw",
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"
|
|
24
|
+
"axios": "^1.6.5",
|
|
25
25
|
"chalk": "^5.3.0",
|
|
26
|
+
"clanker-sdk": "^4.0.0",
|
|
27
|
+
"dotenv": "^16.3.1",
|
|
26
28
|
"inquirer": "^9.2.12",
|
|
29
|
+
"node-fetch": "^3.3.2",
|
|
27
30
|
"ora": "^8.0.1",
|
|
28
|
-
"
|
|
29
|
-
"dotenv": "^16.3.1",
|
|
31
|
+
"undici": "^7.22.0",
|
|
30
32
|
"viem": "^2.0.0"
|
|
31
33
|
},
|
|
32
34
|
"devDependencies": {
|