@gearbox-protocol/sdk 8.19.6 → 8.19.7

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.
@@ -24,14 +24,13 @@ module.exports = __toCommonJS(sendRawTx_exports);
24
24
  var import_actions = require("viem/actions");
25
25
  var import_utils = require("viem/utils");
26
26
  async function sendRawTx(client, params) {
27
- const { account, tx } = params;
27
+ const { tx, ...rest } = params;
28
28
  return (0, import_utils.getAction)(
29
29
  client,
30
30
  import_actions.sendTransaction,
31
31
  "sendTransaction"
32
32
  )({
33
- // @ts-expect-error
34
- account,
33
+ ...rest,
35
34
  data: tx.callData,
36
35
  to: tx.to,
37
36
  value: BigInt(tx.value)
@@ -1,14 +1,13 @@
1
1
  import { sendTransaction } from "viem/actions";
2
2
  import { getAction } from "viem/utils";
3
3
  async function sendRawTx(client, params) {
4
- const { account, tx } = params;
4
+ const { tx, ...rest } = params;
5
5
  return getAction(
6
6
  client,
7
7
  sendTransaction,
8
8
  "sendTransaction"
9
9
  )({
10
- // @ts-expect-error
11
- account,
10
+ ...rest,
12
11
  data: tx.callData,
13
12
  to: tx.to,
14
13
  value: BigInt(tx.value)
@@ -1,7 +1,7 @@
1
- import type { Account, Chain, Client, SendTransactionReturnType, Transport } from "viem";
1
+ import type { Account, Chain, Client, SendTransactionRequest, SendTransactionReturnType, Transport } from "viem";
2
+ import { type SendTransactionParameters } from "viem/actions";
2
3
  import type { RawTx } from "../../types/index.js";
3
- export interface SendRawTxParameters {
4
- account?: Account;
4
+ export type SendRawTxParameters<chain extends Chain, account extends Account | undefined, request extends SendTransactionRequest<chain, chainOverride>, chainOverride extends Chain | undefined = undefined> = Omit<SendTransactionParameters<chain, account, chainOverride, request>, "data" | "to" | "value"> & {
5
5
  tx: Pick<RawTx, "to" | "callData" | "value">;
6
- }
7
- export declare function sendRawTx<chain extends Chain | undefined = Chain | undefined>(client: Client<Transport, chain, Account | undefined>, params: SendRawTxParameters): Promise<SendTransactionReturnType>;
6
+ };
7
+ export declare function sendRawTx<chain extends Chain, account extends Account | undefined, const request extends SendTransactionRequest<chain, chainOverride>, chainOverride extends Chain | undefined>(client: Client<Transport, chain, account>, params: SendRawTxParameters<chain, account, request, chainOverride>): Promise<SendTransactionReturnType>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "8.19.6",
3
+ "version": "8.19.7",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/sdk/index.js",