near-safe 0.9.1 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,4 +4,5 @@ export * from "./util";
4
4
  export * from "./constants";
5
5
  export * from "./decode";
6
6
  export * from "./lib/safe-message";
7
- export { Network, BaseTx, SignRequestData, populateTx, NetworkFields, signatureFromOutcome, signatureFromTxHash, requestRouter as mpcRequestRouter, EthTransactionParams, isRlpHex, } from "near-ca";
7
+ export { SafeContractSuite } from "./lib/safe";
8
+ export { Network, type BaseTx, type SignRequestData, populateTx, type NetworkFields, signatureFromOutcome, signatureFromTxHash, requestRouter as mpcRequestRouter, type EthTransactionParams, isRlpHex, } from "near-ca";
package/dist/cjs/index.js CHANGED
@@ -14,13 +14,15 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.isRlpHex = exports.mpcRequestRouter = exports.signatureFromTxHash = exports.signatureFromOutcome = exports.populateTx = exports.Network = void 0;
17
+ exports.isRlpHex = exports.mpcRequestRouter = exports.signatureFromTxHash = exports.signatureFromOutcome = exports.populateTx = exports.Network = exports.SafeContractSuite = void 0;
18
18
  __exportStar(require("./near-safe"), exports);
19
19
  __exportStar(require("./types"), exports);
20
20
  __exportStar(require("./util"), exports);
21
21
  __exportStar(require("./constants"), exports);
22
22
  __exportStar(require("./decode"), exports);
23
23
  __exportStar(require("./lib/safe-message"), exports);
24
+ var safe_1 = require("./lib/safe");
25
+ Object.defineProperty(exports, "SafeContractSuite", { enumerable: true, get: function () { return safe_1.SafeContractSuite; } });
24
26
  // TODO: Improve re-exports...
25
27
  var near_ca_1 = require("near-ca");
26
28
  Object.defineProperty(exports, "Network", { enumerable: true, get: function () { return near_ca_1.Network; } });
@@ -277,6 +277,9 @@ class NearSafe {
277
277
  })();
278
278
  // Assert uniqueness
279
279
  (0, util_1.assertUnique)(fromAddresses);
280
+ if (!fromAddresses[0]) {
281
+ throw new Error("No from address provided");
282
+ }
280
283
  // Early return with eoaEncoding if `from` is not the Safe
281
284
  if (!this.encodeForSafe(fromAddresses[0])) {
282
285
  // TODO: near-ca needs to update this for typed data like we did.
@@ -4,4 +4,5 @@ export * from "./util";
4
4
  export * from "./constants";
5
5
  export * from "./decode";
6
6
  export * from "./lib/safe-message";
7
- export { Network, BaseTx, SignRequestData, populateTx, NetworkFields, signatureFromOutcome, signatureFromTxHash, requestRouter as mpcRequestRouter, EthTransactionParams, isRlpHex, } from "near-ca";
7
+ export { SafeContractSuite } from "./lib/safe";
8
+ export { Network, type BaseTx, type SignRequestData, populateTx, type NetworkFields, signatureFromOutcome, signatureFromTxHash, requestRouter as mpcRequestRouter, type EthTransactionParams, isRlpHex, } from "near-ca";
package/dist/esm/index.js CHANGED
@@ -4,5 +4,6 @@ export * from "./util";
4
4
  export * from "./constants";
5
5
  export * from "./decode";
6
6
  export * from "./lib/safe-message";
7
+ export { SafeContractSuite } from "./lib/safe";
7
8
  // TODO: Improve re-exports...
8
9
  export { Network, populateTx, signatureFromOutcome, signatureFromTxHash, requestRouter as mpcRequestRouter, isRlpHex, } from "near-ca";
@@ -280,6 +280,9 @@ export class NearSafe {
280
280
  })();
281
281
  // Assert uniqueness
282
282
  assertUnique(fromAddresses);
283
+ if (!fromAddresses[0]) {
284
+ throw new Error("No from address provided");
285
+ }
283
286
  // Early return with eoaEncoding if `from` is not the Safe
284
287
  if (!this.encodeForSafe(fromAddresses[0])) {
285
288
  // TODO: near-ca needs to update this for typed data like we did.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "near-safe",
3
- "version": "0.9.1",
3
+ "version": "0.9.3",
4
4
  "license": "MIT",
5
5
  "description": "An SDK for controlling Ethereum Smart Accounts via ERC4337 from a Near Account.",
6
6
  "author": "bh2smith",
@@ -37,30 +37,28 @@
37
37
  "example": "tsx examples/send-tx.ts",
38
38
  "lint": "prettier --check '{src,examples,tests}/**/*.{js,jsx,ts,tsx}' && eslint . --ignore-pattern dist/",
39
39
  "fmt": "prettier --write '{src,examples,tests}/**/*.{js,jsx,ts,tsx}' && yarn lint --fix",
40
- "test": "jest",
40
+ "test": "jest --passWithNoTests",
41
41
  "all": "yarn fmt && yarn lint && yarn build"
42
42
  },
43
43
  "dependencies": {
44
44
  "@safe-global/safe-gateway-typescript-sdk": "^3.22.2",
45
45
  "near-api-js": "^5.0.1",
46
- "near-ca": "^0.7.2",
46
+ "near-ca": "^0.7.3",
47
47
  "semver": "^7.6.3",
48
- "viem": "^2.21.41"
48
+ "viem": "^2.21.45"
49
49
  },
50
50
  "devDependencies": {
51
- "@safe-global/safe-deployments": "^1.37.14",
51
+ "@safe-global/safe-deployments": "^1.37.16",
52
52
  "@safe-global/safe-modules-deployments": "^2.2.4",
53
53
  "@types/jest": "^29.5.14",
54
54
  "@types/node": "^22.9.0",
55
55
  "@types/semver": "^7.5.8",
56
56
  "@types/yargs": "^17.0.33",
57
- "@typescript-eslint/eslint-plugin": "^8.13.0",
58
- "@typescript-eslint/parser": "^8.13.0",
57
+ "@typescript-eslint/eslint-plugin": "^8.14.0",
58
+ "@typescript-eslint/parser": "^8.14.0",
59
59
  "dotenv": "^16.4.5",
60
60
  "eslint": "^9.14.0",
61
61
  "eslint-plugin-import": "^2.31.0",
62
- "ethers": "^6.13.4",
63
- "ethers-multisend": "^3.1.0",
64
62
  "jest": "^29.7.0",
65
63
  "prettier": "^3.3.3",
66
64
  "ts-jest": "^29.2.5",