near-safe 0.9.2 → 0.9.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.d.ts +2 -1
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/near-safe.js +3 -0
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/near-safe.js +3 -0
- package/package.json +2 -4
package/dist/cjs/index.d.ts
CHANGED
@@ -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 {
|
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; } });
|
package/dist/cjs/near-safe.js
CHANGED
@@ -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.
|
package/dist/esm/index.d.ts
CHANGED
@@ -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 {
|
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";
|
package/dist/esm/near-safe.js
CHANGED
@@ -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.
|
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,7 +37,7 @@
|
|
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": {
|
@@ -59,8 +59,6 @@
|
|
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",
|