@tempoxyz/patron 0.0.17 → 0.0.18

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/bin.js CHANGED
@@ -4,14 +4,14 @@ const require = __patronCreateRequire(import.meta.url)
4
4
 
5
5
  // src/bin.ts
6
6
  if (process.argv[2] === "hook") {
7
- const { runHookProcess } = await import("./chunks/hook-process-WAFRLISI.js");
7
+ const { runHookProcess } = await import("./chunks/hook-process-YHSATQFR.js");
8
8
  await runHookProcess().catch(() => void 0);
9
9
  process.exit(0);
10
10
  } else if (process.argv[2] === "pay") {
11
- const { runPayProcess } = await import("./chunks/hook-process-WAFRLISI.js");
11
+ const { runPayProcess } = await import("./chunks/hook-process-YHSATQFR.js");
12
12
  await runPayProcess().catch(() => void 0);
13
13
  process.exit(0);
14
14
  } else {
15
- const { run } = await import("./chunks/-4YBTFSTL.js");
15
+ const { run } = await import("./chunks/-643GYNS6.js");
16
16
  process.exitCode = await run(process.argv.slice(2));
17
17
  }
@@ -1,46 +1,50 @@
1
1
  import { createRequire as __patronCreateRequire } from 'node:module'
2
2
  const require = __patronCreateRequire(import.meta.url)
3
3
  import {
4
- DEFAULT_MONTHLY_BUDGET_USD,
5
4
  FileTokenStore,
6
5
  LeaderboardResponse,
7
- MAX_TOKENS_PER_PAGE,
8
- MIN_TOKENS_PER_PAGE,
9
- PACK_SIZE,
10
6
  PatronInfo,
11
7
  STARTER_TOKENS,
12
- TOKEN_PRICE_UNITS,
13
8
  budgetTokens,
14
9
  buyTokens,
15
- clampTokensPerPage,
16
10
  codexHome,
17
11
  codexPaths,
18
- formatUsd,
19
12
  hasPatronHandler,
20
13
  installCodex,
21
14
  isObject,
22
15
  isPatronHandler,
23
16
  loadIssuer,
24
17
  needsRefill,
25
- normalizePayee,
26
18
  parseUsd,
27
19
  profileMessage,
28
20
  purchasableTokens,
29
21
  readJsonObject,
30
22
  redeem,
31
23
  removeCodex,
32
- resolveSettings,
33
- settingsFor,
34
- startRefill,
35
24
  tipTokens,
36
- tokensToUnits,
37
25
  upgradeCodex,
38
26
  withHooksKey,
39
27
  withPatronGroup,
40
28
  withPatronStatus,
41
29
  withoutPatronHandlers,
42
30
  writeJsonObject
43
- } from "./chunk-GYL4GCNU.js";
31
+ } from "./chunk-XJOIDBXC.js";
32
+ import {
33
+ startRefill
34
+ } from "./chunk-CV2WYKM7.js";
35
+ import {
36
+ DEFAULT_MONTHLY_BUDGET_USD,
37
+ MAX_TOKENS_PER_PAGE,
38
+ MIN_TOKENS_PER_PAGE,
39
+ PACK_SIZE,
40
+ TOKEN_PRICE_UNITS,
41
+ clampTokensPerPage,
42
+ formatUsd,
43
+ normalizePayee,
44
+ resolveSettings,
45
+ settingsFor,
46
+ tokensToUnits
47
+ } from "./chunk-CF4LJZLC.js";
44
48
  import {
45
49
  AGENT_IDS,
46
50
  ensureHome,
@@ -53,7 +57,8 @@ import {
53
57
  withLock,
54
58
  writeConfig,
55
59
  writePrivateFile
56
- } from "./chunk-FXE4CGY7.js";
60
+ } from "./chunk-RDEPJ6XD.js";
61
+ import "./chunk-GTMLTZRN.js";
57
62
 
58
63
  // src/index.ts
59
64
  import { readFileSync } from "node:fs";
@@ -614,7 +619,7 @@ ${styleText(title, "bold", color)}
614
619
  // src/purchase.ts
615
620
  var REFILL_LOCK_STALE_MS = 5 * 60 * 1e3;
616
621
  var defaultOpenWallet = async (settings, config, issuer, maxUnits) => {
617
- const { openWallet } = await import("./wallet-JDUPZN7E.js");
622
+ const { openWallet } = await import("./wallet-WNPT6R4M.js");
618
623
  return openWallet(settings, config.wallet, issuer, maxUnits);
619
624
  };
620
625
  async function buyWithinBudget(settings, config, wanted, openWallet = defaultOpenWallet) {
@@ -885,7 +890,7 @@ async function setup(deps) {
885
890
  deps,
886
891
  settings.privateKey ? "Using PATRON_PRIVATE_KEY" : "Signing in with Tempo Wallet"
887
892
  );
888
- const { signIn } = await import("./wallet-JDUPZN7E.js");
893
+ const { signIn } = await import("./wallet-WNPT6R4M.js");
889
894
  const account = await signIn(settings, { budgetUnits, issuer, output: deps.stdout });
890
895
  done(deps, `Signed in as ${account.address}`);
891
896
  const config = {
@@ -999,7 +1004,7 @@ async function changeBudget(deps, input) {
999
1004
  } else budget = await askBudget(deps, config.monthlyBudgetUsd);
1000
1005
  if (config.wallet === "tempo" && budget > config.monthlyBudgetUsd) {
1001
1006
  step(deps, "Approve the new spending limit in Tempo Wallet");
1002
- const { authorizeBudget } = await import("./wallet-JDUPZN7E.js");
1007
+ const { authorizeBudget } = await import("./wallet-WNPT6R4M.js");
1003
1008
  const issuer = await loadIssuer(settings.home, settings.gatewayUrl, {
1004
1009
  fetch: deps.fetch
1005
1010
  });
@@ -1111,7 +1116,7 @@ async function setName(deps, name) {
1111
1116
  const issuer = await loadIssuer(settings.home, settings.gatewayUrl, {
1112
1117
  fetch: deps.fetch
1113
1118
  });
1114
- const open = deps.openWallet ?? (async (s, c, i, max) => (await import("./wallet-JDUPZN7E.js")).openWallet(s, c.wallet, i, max));
1119
+ const open = deps.openWallet ?? (async (s, c, i, max) => (await import("./wallet-WNPT6R4M.js")).openWallet(s, c.wallet, i, max));
1115
1120
  const wallet = await open(settings, config, issuer, 0n);
1116
1121
  await setProfile(settings.gatewayUrl, wallet, name, deps.fetch);
1117
1122
  await writeConfig(settings.home, { ...config, name });