@injectivelabs/wallet-core 1.20.61 → 1.20.62

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/README.md CHANGED
@@ -41,6 +41,12 @@ export const msgBroadcaster = new MsgBroadcaster({ ...broadcasterArgs, walletStr
41
41
 
42
42
  Read more and find example usages on our [WalletStrategy Docs](https://docs.ts.injective.network/wallet/wallet-wallet-strategy)
43
43
 
44
+ ### Fixed gas
45
+
46
+ With `useFixedGas: true` and no explicit gas limit, `MsgBroadcaster` applies a fixed 1.2 multiplier to message presets for Cosmos wallet strategies, including `Wallet.PrivateKeyCosmos`. EVM wallet presets, explicit gas overrides, and fallback gas limits are unchanged. `gasBufferCoefficient` controls the buffer for simulated gas only.
47
+
48
+ This correction is scoped to wallet-core's `MsgBroadcaster`. The SDK's `MsgBroadcasterWithPk` retains unbuffered presets for both DirectSign and EIP-712 fee delegation. For example, the same `MsgWithdrawV2` uses 384,000 gas through `MsgBroadcaster` with `Wallet.PrivateKeyCosmos`, and 320,000 through `MsgBroadcasterWithPk`.
49
+
44
50
  ---
45
51
 
46
52
  ## 📜 Contribution
@@ -77,7 +77,8 @@ var MsgBroadcaster = class {
77
77
  msgs,
78
78
  gas,
79
79
  simulateTx: this.simulateTx,
80
- useFixedGas: this.useFixedGas
80
+ useFixedGas: this.useFixedGas,
81
+ fixedGasBufferCoefficient: (0, __injectivelabs_wallet_base.isCosmosWallet)(this.walletStrategy.wallet) ? 1.2 : 1
81
82
  });
82
83
  }
83
84
  async getEvmChainId() {
@@ -1,4 +1,4 @@
1
- const require_broadcaster = require('./broadcaster-B2w12U0i.cjs');
1
+ const require_broadcaster = require('./broadcaster-DF_pH92E.cjs');
2
2
  require('./defineProperty-CImP5zIM.cjs');
3
3
 
4
4
  exports.MsgBroadcaster = require_broadcaster.MsgBroadcaster;
@@ -1,3 +1,3 @@
1
1
  import "./BaseWalletStrategy-CD9sBzZB.cjs";
2
- import { a as MsgBroadcasterTxOptionsWithAddresses, i as MsgBroadcasterTxOptions, n as MsgBroadcaster, r as MsgBroadcasterOptions, t as Web3Broadcaster } from "./index-CHR5Ye7m.cjs";
2
+ import { a as MsgBroadcasterTxOptionsWithAddresses, i as MsgBroadcasterTxOptions, n as MsgBroadcaster, r as MsgBroadcasterOptions, t as Web3Broadcaster } from "./index-BkHfMWkC.cjs";
3
3
  export { MsgBroadcaster, MsgBroadcasterOptions, MsgBroadcasterTxOptions, MsgBroadcasterTxOptionsWithAddresses, Web3Broadcaster };
@@ -38,6 +38,7 @@ interface MsgBroadcasterOptions {
38
38
  txInclusion?: TxClientInclusionOptions;
39
39
  walletStrategy: BaseWalletStrategy;
40
40
  useDynamicBaseFee?: boolean;
41
+ /** Buffers automatic message presets by 1.2 for Cosmos wallet strategies. */
41
42
  useFixedGas?: boolean;
42
43
  txTimeoutOnFeeDelegation?: boolean;
43
44
  gasBufferCoefficient?: number;
@@ -1,4 +1,4 @@
1
- const require_broadcaster = require('./broadcaster-B2w12U0i.cjs');
1
+ const require_broadcaster = require('./broadcaster-DF_pH92E.cjs');
2
2
  require('./defineProperty-CImP5zIM.cjs');
3
3
  const require_strategy = require('./strategy-BxKznCI0.cjs');
4
4
 
@@ -1,5 +1,5 @@
1
1
  import { t as BaseWalletStrategy } from "./BaseWalletStrategy-CD9sBzZB.cjs";
2
- import { a as MsgBroadcasterTxOptionsWithAddresses, i as MsgBroadcasterTxOptions, n as MsgBroadcaster, r as MsgBroadcasterOptions, t as Web3Broadcaster } from "./index-CHR5Ye7m.cjs";
2
+ import { a as MsgBroadcasterTxOptionsWithAddresses, i as MsgBroadcasterTxOptions, n as MsgBroadcaster, r as MsgBroadcasterOptions, t as Web3Broadcaster } from "./index-BkHfMWkC.cjs";
3
3
  import "./index-DLoAMD9J.cjs";
4
4
 
5
5
  //#region src/utils/tx.d.ts
@@ -77,7 +77,8 @@ var MsgBroadcaster = class {
77
77
  msgs,
78
78
  gas,
79
79
  simulateTx: this.simulateTx,
80
- useFixedGas: this.useFixedGas
80
+ useFixedGas: this.useFixedGas,
81
+ fixedGasBufferCoefficient: isCosmosWallet(this.walletStrategy.wallet) ? 1.2 : 1
81
82
  });
82
83
  }
83
84
  async getEvmChainId() {
@@ -1,3 +1,3 @@
1
1
  import "./BaseWalletStrategy-2HVN2oeB.js";
2
- import { a as MsgBroadcasterTxOptionsWithAddresses, i as MsgBroadcasterTxOptions, n as MsgBroadcaster, r as MsgBroadcasterOptions, t as Web3Broadcaster } from "./index-70XLhK_X.js";
2
+ import { a as MsgBroadcasterTxOptionsWithAddresses, i as MsgBroadcasterTxOptions, n as MsgBroadcaster, r as MsgBroadcasterOptions, t as Web3Broadcaster } from "./index-DaqeDXLx.js";
3
3
  export { MsgBroadcaster, MsgBroadcasterOptions, MsgBroadcasterTxOptions, MsgBroadcasterTxOptionsWithAddresses, Web3Broadcaster };
@@ -1,4 +1,4 @@
1
- import { n as MsgBroadcaster, t as Web3Broadcaster } from "./broadcaster-iB5heVHH.js";
1
+ import { n as MsgBroadcaster, t as Web3Broadcaster } from "./broadcaster-CYjdFjbm.js";
2
2
  import "./defineProperty-D4YE9KXX.js";
3
3
 
4
4
  export { MsgBroadcaster, Web3Broadcaster };
@@ -38,6 +38,7 @@ interface MsgBroadcasterOptions {
38
38
  txInclusion?: TxClientInclusionOptions;
39
39
  walletStrategy: BaseWalletStrategy;
40
40
  useDynamicBaseFee?: boolean;
41
+ /** Buffers automatic message presets by 1.2 for Cosmos wallet strategies. */
41
42
  useFixedGas?: boolean;
42
43
  txTimeoutOnFeeDelegation?: boolean;
43
44
  gasBufferCoefficient?: number;
@@ -1,5 +1,5 @@
1
1
  import { t as BaseWalletStrategy } from "./BaseWalletStrategy-2HVN2oeB.js";
2
- import { a as MsgBroadcasterTxOptionsWithAddresses, i as MsgBroadcasterTxOptions, n as MsgBroadcaster, r as MsgBroadcasterOptions, t as Web3Broadcaster } from "./index-70XLhK_X.js";
2
+ import { a as MsgBroadcasterTxOptionsWithAddresses, i as MsgBroadcasterTxOptions, n as MsgBroadcaster, r as MsgBroadcasterOptions, t as Web3Broadcaster } from "./index-DaqeDXLx.js";
3
3
  import "./index-DRYular4.js";
4
4
 
5
5
  //#region src/utils/tx.d.ts
package/dist/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { n as MsgBroadcaster, r as checkIfTxRunOutOfGas, t as Web3Broadcaster } from "./broadcaster-iB5heVHH.js";
1
+ import { n as MsgBroadcaster, r as checkIfTxRunOutOfGas, t as Web3Broadcaster } from "./broadcaster-CYjdFjbm.js";
2
2
  import "./defineProperty-D4YE9KXX.js";
3
3
  import { t as BaseWalletStrategy } from "./strategy-Co4vD1wN.js";
4
4
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@injectivelabs/wallet-core",
3
- "version": "1.20.61",
3
+ "version": "1.20.62",
4
4
  "description": "Core wallet strategy",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
@@ -84,12 +84,12 @@
84
84
  "dependencies": {
85
85
  "@keplr-wallet/types": "^0.12.296",
86
86
  "eventemitter3": "^5.0.1",
87
- "@injectivelabs/exceptions": "1.20.61",
88
- "@injectivelabs/networks": "1.20.61",
89
- "@injectivelabs/utils": "1.20.61",
90
- "@injectivelabs/ts-types": "1.20.61",
91
- "@injectivelabs/sdk-ts": "1.20.61",
92
- "@injectivelabs/wallet-base": "1.20.61"
87
+ "@injectivelabs/ts-types": "1.20.62",
88
+ "@injectivelabs/wallet-base": "1.20.62",
89
+ "@injectivelabs/sdk-ts": "1.20.62",
90
+ "@injectivelabs/networks": "1.20.62",
91
+ "@injectivelabs/utils": "1.20.62",
92
+ "@injectivelabs/exceptions": "1.20.62"
93
93
  },
94
94
  "publishConfig": {
95
95
  "access": "public"