dacty-launch 1.4.3 → 1.4.5
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 +17 -3
- package/lib/index.mjs +17 -3
- package/package.json +6 -4
package/bin/dacty-launch.mjs
CHANGED
|
@@ -9,6 +9,12 @@ 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 - use undici
|
|
13
|
+
if (typeof globalThis.fetch === 'undefined') {
|
|
14
|
+
const { fetch: undiciFetch } = await import('undici');
|
|
15
|
+
globalThis.fetch = undiciFetch;
|
|
16
|
+
}
|
|
17
|
+
|
|
12
18
|
const __filename = fileURLToPath(import.meta.url);
|
|
13
19
|
const __dirname = path.dirname(__filename);
|
|
14
20
|
|
|
@@ -115,15 +121,23 @@ async function main() {
|
|
|
115
121
|
try {
|
|
116
122
|
console.log('🔄 Initializing Clanker SDK...');
|
|
117
123
|
|
|
118
|
-
// Setup viem clients
|
|
124
|
+
// Setup viem clients with explicit fetch
|
|
119
125
|
const account = privateKeyToAccount(privateKey);
|
|
120
|
-
const publicClient = createPublicClient({
|
|
121
|
-
|
|
126
|
+
const publicClient = createPublicClient({
|
|
127
|
+
chain: base,
|
|
128
|
+
transport: http(undefined, { fetch: globalThis.fetch })
|
|
129
|
+
});
|
|
130
|
+
const walletClient = createWalletClient({
|
|
131
|
+
account,
|
|
132
|
+
chain: base,
|
|
133
|
+
transport: http(undefined, { fetch: globalThis.fetch })
|
|
134
|
+
});
|
|
122
135
|
|
|
123
136
|
// Initialize Clanker SDK
|
|
124
137
|
const clanker = new Clanker({
|
|
125
138
|
publicClient,
|
|
126
139
|
wallet: walletClient,
|
|
140
|
+
fetch: globalThis.fetch,
|
|
127
141
|
});
|
|
128
142
|
|
|
129
143
|
console.log('✓ Clanker SDK initialized');
|
package/lib/index.mjs
CHANGED
|
@@ -9,6 +9,12 @@ 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 - use undici
|
|
13
|
+
if (typeof globalThis.fetch === 'undefined') {
|
|
14
|
+
const { fetch: undiciFetch } = await import('undici');
|
|
15
|
+
globalThis.fetch = undiciFetch;
|
|
16
|
+
}
|
|
17
|
+
|
|
12
18
|
const __filename = fileURLToPath(import.meta.url);
|
|
13
19
|
const __dirname = path.dirname(__filename);
|
|
14
20
|
|
|
@@ -115,15 +121,23 @@ async function main() {
|
|
|
115
121
|
try {
|
|
116
122
|
console.log('🔄 Initializing Clanker SDK...');
|
|
117
123
|
|
|
118
|
-
// Setup viem clients
|
|
124
|
+
// Setup viem clients with explicit fetch
|
|
119
125
|
const account = privateKeyToAccount(privateKey);
|
|
120
|
-
const publicClient = createPublicClient({
|
|
121
|
-
|
|
126
|
+
const publicClient = createPublicClient({
|
|
127
|
+
chain: base,
|
|
128
|
+
transport: http(undefined, { fetch: globalThis.fetch })
|
|
129
|
+
});
|
|
130
|
+
const walletClient = createWalletClient({
|
|
131
|
+
account,
|
|
132
|
+
chain: base,
|
|
133
|
+
transport: http(undefined, { fetch: globalThis.fetch })
|
|
134
|
+
});
|
|
122
135
|
|
|
123
136
|
// Initialize Clanker SDK
|
|
124
137
|
const clanker = new Clanker({
|
|
125
138
|
publicClient,
|
|
126
139
|
wallet: walletClient,
|
|
140
|
+
fetch: globalThis.fetch,
|
|
127
141
|
});
|
|
128
142
|
|
|
129
143
|
console.log('✓ Clanker SDK initialized');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dacty-launch",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.5",
|
|
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": {
|