apow-cli 0.11.13 → 0.11.15
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/index.js +6 -3
- package/dist/x402.js +1 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -98,10 +98,10 @@ function ensureGitignoreSafetyEntries() {
|
|
|
98
98
|
(0, node_fs_1.writeFileSync)(gitignorePath, content, "utf8");
|
|
99
99
|
ui.ok(`Updated .gitignore: added ${missing.join(", ")}`);
|
|
100
100
|
}
|
|
101
|
-
async function maybeCreateEncryptedKeystoreBackup(address, privateKey) {
|
|
101
|
+
async function maybeCreateEncryptedKeystoreBackup(address, privateKey, opts = {}) {
|
|
102
102
|
const envPassword = process.env.KEYSTORE_PASSWORD?.trim();
|
|
103
103
|
let password = envPassword ?? "";
|
|
104
|
-
if (!password && ui.isInteractiveSession()) {
|
|
104
|
+
if (!password && opts.promptIfMissingPassword && ui.isInteractiveSession()) {
|
|
105
105
|
const createBackup = await ui.confirm("Create encrypted JSON keystore backup? (recommended)");
|
|
106
106
|
if (!createBackup) {
|
|
107
107
|
return null;
|
|
@@ -128,7 +128,9 @@ async function saveWalletArtifacts(address, privateKey, opts = {}) {
|
|
|
128
128
|
if (opts.createPlaintextImportFile !== false) {
|
|
129
129
|
result.plaintextPath = (0, wallet_store_1.savePlaintextImportFile)(address, privateKey);
|
|
130
130
|
}
|
|
131
|
-
const keystorePath = await maybeCreateEncryptedKeystoreBackup(address, privateKey
|
|
131
|
+
const keystorePath = await maybeCreateEncryptedKeystoreBackup(address, privateKey, {
|
|
132
|
+
promptIfMissingPassword: opts.promptForKeystoreBackup === true,
|
|
133
|
+
});
|
|
132
134
|
if (keystorePath) {
|
|
133
135
|
result.keystorePath = keystorePath;
|
|
134
136
|
}
|
|
@@ -676,6 +678,7 @@ async function main() {
|
|
|
676
678
|
const savePlaintext = await ui.confirm("Save plaintext import helper?");
|
|
677
679
|
const artifacts = await saveWalletArtifacts(wallet_1.account.address, config_1.config.privateKey, {
|
|
678
680
|
createPlaintextImportFile: savePlaintext,
|
|
681
|
+
promptForKeystoreBackup: true,
|
|
679
682
|
});
|
|
680
683
|
if (artifacts.plaintextPath) {
|
|
681
684
|
console.log(` ${ui.dim(`Saved import helper: ${artifacts.plaintextPath}`)}`);
|
package/dist/x402.js
CHANGED
|
@@ -48,8 +48,7 @@ async function getClient(privateKey) {
|
|
|
48
48
|
baseUrl: QUICKNODE_BASE,
|
|
49
49
|
network: BASE_MAINNET,
|
|
50
50
|
evmPrivateKey: privateKey,
|
|
51
|
-
|
|
52
|
-
// paymentModel defaults to 'credit-drawdown' — no per-request payments
|
|
51
|
+
paymentModel: "pay-per-request",
|
|
53
52
|
});
|
|
54
53
|
return _client;
|
|
55
54
|
}
|