dacty-launch 1.3.0 → 1.3.1

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.
@@ -87,7 +87,10 @@ async function main() {
87
87
  process.exit(1);
88
88
  }
89
89
 
90
- const privateKey = privateKeyMatch[1].trim();
90
+ // Parse private key: remove quotes, trim whitespace
91
+ let privateKey = privateKeyMatch[1].trim();
92
+ privateKey = privateKey.replace(/^["']|["']$/g, ''); // Remove surrounding quotes
93
+ privateKey = privateKey.trim(); // Trim again after removing quotes
91
94
  console.log('✓ Private key loaded from .env\n');
92
95
 
93
96
  // Get token details from user
@@ -109,7 +112,7 @@ async function main() {
109
112
  console.log('🔄 Initializing Clanker SDK...');
110
113
 
111
114
  // Setup viem clients
112
- const account = privateKeyToAccount(`0x${privateKey.replace(/^0x/, '')}`);
115
+ const account = privateKeyToAccount(privateKey);
113
116
  const publicClient = createPublicClient({ chain: base, transport: http() });
114
117
  const walletClient = createWalletClient({ account, chain: base, transport: http() });
115
118
 
@@ -211,6 +214,9 @@ async function main() {
211
214
  rl.close();
212
215
  } catch (error) {
213
216
  console.error('❌ Error:', error.message);
217
+ if (error.message.includes('invalid private key')) {
218
+ console.error(' Hint: Check that AGENT_PRIVATE_KEY in .env is valid and properly formatted');
219
+ }
214
220
  rl.close();
215
221
  process.exit(1);
216
222
  }
package/lib/index.mjs CHANGED
@@ -87,7 +87,10 @@ async function main() {
87
87
  process.exit(1);
88
88
  }
89
89
 
90
- const privateKey = privateKeyMatch[1].trim();
90
+ // Parse private key: remove quotes, trim whitespace
91
+ let privateKey = privateKeyMatch[1].trim();
92
+ privateKey = privateKey.replace(/^["']|["']$/g, ''); // Remove surrounding quotes
93
+ privateKey = privateKey.trim(); // Trim again after removing quotes
91
94
  console.log('✓ Private key loaded from .env\n');
92
95
 
93
96
  // Get token details from user
@@ -109,7 +112,7 @@ async function main() {
109
112
  console.log('🔄 Initializing Clanker SDK...');
110
113
 
111
114
  // Setup viem clients
112
- const account = privateKeyToAccount(`0x${privateKey.replace(/^0x/, '')}`);
115
+ const account = privateKeyToAccount(privateKey);
113
116
  const publicClient = createPublicClient({ chain: base, transport: http() });
114
117
  const walletClient = createWalletClient({ account, chain: base, transport: http() });
115
118
 
@@ -211,6 +214,9 @@ async function main() {
211
214
  rl.close();
212
215
  } catch (error) {
213
216
  console.error('❌ Error:', error.message);
217
+ if (error.message.includes('invalid private key')) {
218
+ console.error(' Hint: Check that AGENT_PRIVATE_KEY in .env is valid and properly formatted');
219
+ }
214
220
  rl.close();
215
221
  process.exit(1);
216
222
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dacty-launch",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Launch tokens for agents in the Dactyclaw ecosystem",
5
5
  "type": "module",
6
6
  "bin": {