kill-switch-mcp 1.2.12 → 1.2.14

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.
Files changed (2) hide show
  1. package/dist/server.js +12 -3
  2. package/package.json +1 -1
package/dist/server.js CHANGED
@@ -3855,7 +3855,7 @@ import {
3855
3855
  stringToHex,
3856
3856
  pad
3857
3857
  } from "viem";
3858
- import { Account, withFeePayer } from "viem/tempo";
3858
+ import { Account, Transaction, withFeePayer } from "viem/tempo";
3859
3859
  import { tempoModerato, tempo } from "viem/chains";
3860
3860
  var TEMPO_BIN = join2(homedir2(), ".tempo", "bin", "tempo");
3861
3861
  var TEMPO_CHAIN_ID = parseInt(process.env.TEMPO_CHAIN_ID || "4217");
@@ -3991,7 +3991,13 @@ function readKeyAuthorization() {
3991
3991
  try {
3992
3992
  const content = readFileSync(tomlPath, "utf-8");
3993
3993
  const match = content.match(/key_authorization\s*=\s*"(0x[0-9a-fA-F]+)"/);
3994
- return match ? match[1] : null;
3994
+ if (!match)
3995
+ return null;
3996
+ const KA = Transaction.z_KeyAuthorization;
3997
+ if (KA?.deserialize) {
3998
+ return KA.deserialize(match[1]);
3999
+ }
4000
+ return match[1];
3995
4001
  } catch {
3996
4002
  return null;
3997
4003
  }
@@ -4091,13 +4097,15 @@ async function joinTournament(tournamentAddress, username) {
4091
4097
  }
4092
4098
  const keyAuth = readKeyAuthorization();
4093
4099
  const sponsorOpts = feePayerUrl ? { feePayer: true } : {};
4100
+ const gasOpts = keyAuth ? { gas: 700000n } : {};
4094
4101
  const approveHash = await walletClient.writeContract({
4095
4102
  address: USDC_ADDRESS,
4096
4103
  abi: ERC20_ABI,
4097
4104
  functionName: "approve",
4098
4105
  args: [tournamentAddress, buyIn],
4099
4106
  ...keyAuth ? { keyAuthorization: keyAuth } : {},
4100
- ...sponsorOpts
4107
+ ...sponsorOpts,
4108
+ ...gasOpts
4101
4109
  });
4102
4110
  await pub.waitForTransactionReceipt({ hash: approveHash });
4103
4111
  const usernameBytes = pad(stringToHex(username), { size: 32 });
@@ -4107,6 +4115,7 @@ async function joinTournament(tournamentAddress, username) {
4107
4115
  functionName: "deposit",
4108
4116
  args: [usernameBytes],
4109
4117
  ...keyAuth ? { keyAuthorization: keyAuth } : {},
4118
+ ...gasOpts,
4110
4119
  ...sponsorOpts
4111
4120
  });
4112
4121
  await pub.waitForTransactionReceipt({ hash: depositHash });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kill-switch-mcp",
3
- "version": "1.2.12",
3
+ "version": "1.2.14",
4
4
  "description": "Kill Switch MCP Server — AI battle royale powered by Claude Code",
5
5
  "type": "module",
6
6
  "bin": {