@morpho-org/bundler-sdk-viem 3.0.0 → 3.1.0

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.
@@ -1,5 +1,8 @@
1
- import { BundlerAction } from "./BundlerAction.js";
2
- export class ActionBundleRequirements {
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ActionBundle = exports.ActionBundleRequirements = void 0;
4
+ const BundlerAction_js_1 = require("./BundlerAction.js");
5
+ class ActionBundleRequirements {
3
6
  txs;
4
7
  signatures;
5
8
  constructor(txs = [], signatures = []) {
@@ -10,7 +13,8 @@ export class ActionBundleRequirements {
10
13
  return Promise.all(this.signatures.map((requirement) => requirement.sign(client, account)));
11
14
  }
12
15
  }
13
- export class ActionBundle {
16
+ exports.ActionBundleRequirements = ActionBundleRequirements;
17
+ class ActionBundle {
14
18
  actions;
15
19
  requirements;
16
20
  steps;
@@ -27,9 +31,10 @@ export class ActionBundle {
27
31
  }
28
32
  }
29
33
  tx() {
30
- return BundlerAction.encodeBundle(this.chainId, this.actions);
34
+ return BundlerAction_js_1.BundlerAction.encodeBundle(this.chainId, this.actions);
31
35
  }
32
36
  txs() {
33
37
  return this.requirements.txs.map(({ tx }) => tx).concat([this.tx()]);
34
38
  }
35
39
  }
40
+ exports.ActionBundle = ActionBundle;
@@ -1,4 +1,4 @@
1
- import { type ChainId, type InputMarketParams } from "@morpho-org/blue-sdk";
1
+ import { ChainId, type InputMarketParams } from "@morpho-org/blue-sdk";
2
2
  import { type Address, type Hex } from "viem";
3
3
  import type { Action, Authorization, InputReallocation, Permit2PermitSingle } from "./types/index.js";
4
4
  export interface BundlerCall {
@@ -87,6 +87,14 @@ export declare namespace BundlerAction {
87
87
  * @param skipRevert Whether to allow the transfer to revert without making the whole bundler revert. Defaults to false.
88
88
  */
89
89
  function transferFrom2(chainId: ChainId, asset: Address, amount: bigint, recipient: Address, skipRevert?: boolean): BundlerCall[];
90
+ /**
91
+ * Encodes a call to the GeneralAdapter1 to wrap legacy MORPHO tokens.
92
+ * @param chainId The chain id for which to encode the call.
93
+ * @param recipient The recipient of MORPHO tokens.
94
+ * @param amount The amount of tokens to wrap.
95
+ * @param skipRevert Whether to allow the wrap to revert without making the whole bundler revert. Defaults to false.
96
+ */
97
+ function morphoWrapperDepositFor(chainId: ChainId, recipient: Address, amount: bigint, skipRevert?: boolean): BundlerCall[];
90
98
  /**
91
99
  * Encodes a call to the GeneralAdapter1 to wrap ERC20 tokens via the provided ERC20Wrapper.
92
100
  * @param chainId The chain id for which to encode the call.