diff --git a/package.json b/package.json index 9a1df18..8b9467a 100644 --- a/package.json +++ b/package.json @@ -93,6 +93,7 @@ "dist/types/*", "dist/handlers/*", "dist/core/*", + "dist/utils/*", "README.md", "package.json" ], @@ -114,6 +115,11 @@ "require": "./dist/handlers/index.js", "import": "./dist/handlers/index.js", "types": "./dist/handlers/index.d.ts" + }, + "./utils": { + "require": "./dist/utils/index.js", + "import": "./dist/utils/index.js", + "types": "./dist/utils/index.d.ts" } } -} \ No newline at end of file +} diff --git a/rollup.config.mjs b/rollup.config.mjs index 9fd8b20..536e617 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -25,6 +25,14 @@ const config = [ }, plugins: [nodeResolve({ browser: true }), commonjs(), typescript(), yaml(), json(), generateDtsBundle(), terser()], }, + { + input: "src/utils/index.ts", + output: { + dir: "dist/utils", + format: "cjs", + }, + plugins: [nodeResolve({ browser: true }), commonjs(), typescript(), yaml(), json(), generateDtsBundle(), terser()], + }, { input: "src/index.ts", output: { diff --git a/src/handlers/generate-erc20-permit.ts b/src/handlers/generate-erc20-permit.ts index e45d30a..873e0ba 100644 --- a/src/handlers/generate-erc20-permit.ts +++ b/src/handlers/generate-erc20-permit.ts @@ -2,7 +2,7 @@ import { PERMIT2_ADDRESS, PermitTransferFrom, SignatureTransfer } from "@uniswap import { ethers, keccak256, MaxInt256, parseUnits, toUtf8Bytes } from "ethers"; import { Context, Logger } from "../types/context"; import { PermitReward, TokenType } from "../types"; -import { decryptKeys } from "../utils/keys"; +import { decryptKeys } from "../utils"; import { getFastestProvider } from "../utils/get-fastest-provider"; export interface Payload { diff --git a/src/utils/index.ts b/src/utils/index.ts new file mode 100644 index 0000000..d2defee --- /dev/null +++ b/src/utils/index.ts @@ -0,0 +1 @@ +export * from './keys';