armory-cli 0.2.6 → 0.2.8
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/cli.js +9 -28
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -49,33 +49,14 @@ var FACILITATOR_PACKAGE = (name) => `{
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@armory-sh/base": "latest",
|
|
52
|
-
"@armory-sh/
|
|
53
|
-
"@armory-sh/tokens": "latest"
|
|
52
|
+
"@armory-sh/middleware": "latest"
|
|
54
53
|
}
|
|
55
54
|
}`;
|
|
56
|
-
var FACILITATOR_INDEX =
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
const server = createFacilitatorServer({
|
|
61
|
-
port: Number(process.env.PORT ?? 3000),
|
|
62
|
-
host: process.env.HOST ?? "0.0.0.0",
|
|
63
|
-
nonceTracker: new MemoryNonceTracker({ ttl: 60000 }),
|
|
64
|
-
paymentQueue: createMemoryQueue({ maxRetries: 3 }),
|
|
65
|
-
rpcUrls: {
|
|
66
|
-
8453: process.env.BASE_RPC_URL ?? "https://mainnet.base.org",
|
|
67
|
-
84532: process.env.BASE_SEPOLIA_RPC_URL ?? "https://sepolia.base.org",
|
|
68
|
-
},
|
|
69
|
-
privateKey: process.env.PRIVATE_KEY,
|
|
70
|
-
});
|
|
71
|
-
|
|
72
|
-
console.log("Facilitator running on http://" + server.host + ":" + server.port);
|
|
55
|
+
var FACILITATOR_INDEX = `// Note: The facilitator pattern has changed.
|
|
56
|
+
// See @armory-sh/middleware packages for current implementation.
|
|
57
|
+
// This is a basic placeholder.
|
|
73
58
|
|
|
74
|
-
|
|
75
|
-
console.log("\\nShutting down...");
|
|
76
|
-
server.stop();
|
|
77
|
-
process.exit(0);
|
|
78
|
-
});
|
|
59
|
+
console.log("Facilitator pattern has changed. See @armory-sh/middleware packages.");
|
|
79
60
|
`;
|
|
80
61
|
var FACILITATOR_README = (name) => `# ${name}
|
|
81
62
|
|
|
@@ -121,8 +102,8 @@ var SERVER_PACKAGE = (name) => `{
|
|
|
121
102
|
}
|
|
122
103
|
}`;
|
|
123
104
|
var SERVER_INDEX = `import { Bun } from "bun";
|
|
124
|
-
import { paymentMiddleware } from "@armory-sh/middleware
|
|
125
|
-
import { USDC_BASE } from "@armory-sh/
|
|
105
|
+
import { paymentMiddleware } from "@armory-sh/middleware-bun";
|
|
106
|
+
import { USDC_BASE } from "@armory-sh/base";
|
|
126
107
|
|
|
127
108
|
const app = Bun.serve({
|
|
128
109
|
port: 3000,
|
|
@@ -162,12 +143,12 @@ var CLIENT_PACKAGE = (name) => `{
|
|
|
162
143
|
},
|
|
163
144
|
"dependencies": {
|
|
164
145
|
"@armory-sh/client-viem": "latest",
|
|
165
|
-
"@armory-sh/
|
|
146
|
+
"@armory-sh/base": "latest"
|
|
166
147
|
}
|
|
167
148
|
}`;
|
|
168
149
|
var CLIENT_INDEX = `import { createX402Client } from "@armory-sh/client-viem";
|
|
169
150
|
import { privateKeyToAccount } from "viem/accounts";
|
|
170
|
-
import { USDC_BASE } from "@armory-sh/
|
|
151
|
+
import { USDC_BASE } from "@armory-sh/base";
|
|
171
152
|
import { client } from "./client.js";
|
|
172
153
|
|
|
173
154
|
const account = privateKeyToAccount(process.env.PRIVATE_KEY ?? "0x" + "1".repeat(64));
|