@zerodev/sdk 5.4.0 → 5.4.1
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.
- package/_cjs/actions/account-client/sendTransaction.js +2 -2
- package/_cjs/actions/account-client/sendTransaction.js.map +1 -1
- package/_cjs/actions/account-client/signMessage.js +2 -2
- package/_cjs/actions/account-client/signMessage.js.map +1 -1
- package/_cjs/actions/account-client/signTypedData.js +2 -2
- package/_cjs/actions/account-client/signTypedData.js.map +1 -1
- package/_cjs/actions/account-client/signUserOperation.js +2 -2
- package/_cjs/actions/account-client/signUserOperation.js.map +1 -1
- package/_esm/actions/account-client/sendTransaction.js +1 -1
- package/_esm/actions/account-client/sendTransaction.js.map +1 -1
- package/_esm/actions/account-client/signMessage.js +1 -1
- package/_esm/actions/account-client/signMessage.js.map +1 -1
- package/_esm/actions/account-client/signTypedData.js +1 -1
- package/_esm/actions/account-client/signTypedData.js.map +1 -1
- package/_esm/actions/account-client/signUserOperation.js +1 -1
- package/_esm/actions/account-client/signUserOperation.js.map +1 -1
- package/_types/utils/toSigner.d.ts +1 -1
- package/_types/utils/toSigner.d.ts.map +1 -1
- package/actions/account-client/sendTransaction.ts +1 -1
- package/actions/account-client/signMessage.ts +1 -1
- package/actions/account-client/signTypedData.ts +1 -1
- package/actions/account-client/signUserOperation.ts +1 -1
- package/package.json +1 -1
- package/utils/toSigner.ts +1 -1
|
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.sendTransaction = void 0;
|
|
4
4
|
const account_abstraction_1 = require("viem/account-abstraction");
|
|
5
5
|
const utils_1 = require("viem/utils");
|
|
6
|
-
const
|
|
6
|
+
const index_js_1 = require("../../errors/index.js");
|
|
7
7
|
async function sendTransaction(client, args) {
|
|
8
8
|
let userOpHash;
|
|
9
9
|
if ("to" in args) {
|
|
10
10
|
const { account: account_ = client.account, data, maxFeePerGas, maxPriorityFeePerGas, to, value, nonce } = args;
|
|
11
11
|
if (!account_) {
|
|
12
|
-
throw new
|
|
12
|
+
throw new index_js_1.AccountNotFoundError({
|
|
13
13
|
docsPath: "/docs/actions/wallet/sendTransaction"
|
|
14
14
|
});
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendTransaction.js","sourceRoot":"","sources":["../../../actions/account-client/sendTransaction.ts"],"names":[],"mappings":";;;AASA,kEAKiC;AACjC,sCAAoD;AACpD,
|
|
1
|
+
{"version":3,"file":"sendTransaction.js","sourceRoot":"","sources":["../../../actions/account-client/sendTransaction.ts"],"names":[],"mappings":";;;AASA,kEAKiC;AACjC,sCAAoD;AACpD,oDAA4D;AAgDrD,KAAK,UAAU,eAAe,CAOjC,MAAyC,EACzC,IAEkE;IAElE,IAAI,UAAgB,CAAA;IAEpB,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;QACf,MAAM,EACF,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAClC,IAAI,EACJ,YAAY,EACZ,oBAAoB,EACpB,EAAE,EACF,KAAK,EACL,KAAK,EACR,GAAG,IAAI,CAAA;QAER,IAAI,CAAC,QAAQ,EAAE,CAAC;YACZ,MAAM,IAAI,+BAAoB,CAAC;gBAC3B,QAAQ,EAAE,sCAAsC;aACnD,CAAC,CAAA;QACN,CAAC;QAED,MAAM,OAAO,GAAG,IAAA,oBAAY,EAAC,QAAQ,CAAiB,CAAA;QAEtD,IAAI,CAAC,EAAE;YAAE,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAA;QAE9C,UAAU,GAAG,MAAM,IAAA,iBAAS,EACxB,MAAM,EACN,uCAAiB,EACjB,mBAAmB,CACtB,CAAC;YACE,KAAK,EAAE;gBACH;oBACI,EAAE;oBACF,KAAK,EAAE,KAAK,IAAI,MAAM,CAAC,CAAC,CAAC;oBACzB,IAAI,EAAE,IAAI,IAAI,IAAI;iBACrB;aACJ;YACD,OAAO;YACP,YAAY;YACZ,oBAAoB;YACpB,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS;SAC3C,CAAC,CAAA;IACN,CAAC;SAAM,CAAC;QACJ,UAAU,GAAG,MAAM,IAAA,iBAAS,EACxB,MAAM,EACN,uCAAiB,EACjB,mBAAmB,CACtB,CAAC,EAAE,GAAG,IAAI,EAA2D,CAAC,CAAA;IAC3E,CAAC;IAED,MAAM,oBAAoB,GAAG,MAAM,IAAA,iBAAS,EACxC,MAAM,EACN,iDAA2B,EAC3B,6BAA6B,CAChC,CAAC;QACE,IAAI,EAAE,UAAU;KACnB,CAAC,CAAA;IAEF,OAAO,oBAAoB,EAAE,OAAO,CAAC,eAAe,CAAA;AACxD,CAAC;AArED,0CAqEC"}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.signMessage = void 0;
|
|
4
4
|
const utils_1 = require("viem/utils");
|
|
5
|
-
const
|
|
5
|
+
const index_js_1 = require("../../errors/index.js");
|
|
6
6
|
async function signMessage(client, { account: account_ = client.account, message }) {
|
|
7
7
|
if (!account_)
|
|
8
|
-
throw new
|
|
8
|
+
throw new index_js_1.AccountNotFoundError({
|
|
9
9
|
docsPath: "/docs/actions/wallet/signMessage"
|
|
10
10
|
});
|
|
11
11
|
const account = (0, utils_1.parseAccount)(account_);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signMessage.js","sourceRoot":"","sources":["../../../actions/account-client/signMessage.ts"],"names":[],"mappings":";;;AAUA,sCAAyC;AACzC,
|
|
1
|
+
{"version":3,"file":"signMessage.js","sourceRoot":"","sources":["../../../actions/account-client/signMessage.ts"],"names":[],"mappings":";;;AAUA,sCAAyC;AACzC,oDAA4D;AAgDrD,KAAK,UAAU,WAAW,CAC7B,MAAsD,EACtD,EACI,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAClC,OAAO,EACuB;IAElC,IAAI,CAAC,QAAQ;QACT,MAAM,IAAI,+BAAoB,CAAC;YAC3B,QAAQ,EAAE,kCAAkC;SAC/C,CAAC,CAAA;IAEN,MAAM,OAAO,GAAG,IAAA,oBAAY,EAAC,QAAQ,CAAiB,CAAA;IAEtD,OAAO,OAAO,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,CAAC,CAAA;AAC3C,CAAC;AAfD,kCAeC"}
|
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.signTypedData = void 0;
|
|
4
4
|
const viem_1 = require("viem");
|
|
5
5
|
const utils_1 = require("viem/utils");
|
|
6
|
-
const
|
|
6
|
+
const index_js_1 = require("../../errors/index.js");
|
|
7
7
|
async function signTypedData(client, { account: account_ = client.account, domain, message, primaryType, types: types_ }) {
|
|
8
8
|
if (!account_) {
|
|
9
|
-
throw new
|
|
9
|
+
throw new index_js_1.AccountNotFoundError({
|
|
10
10
|
docsPath: "/docs/actions/wallet/signMessage"
|
|
11
11
|
});
|
|
12
12
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signTypedData.js","sourceRoot":"","sources":["../../../actions/account-client/signTypedData.ts"],"names":[],"mappings":";;;AAEA,+BAWa;AAEb,sCAAyC;AACzC,
|
|
1
|
+
{"version":3,"file":"signTypedData.js","sourceRoot":"","sources":["../../../actions/account-client/signTypedData.ts"],"names":[],"mappings":";;;AAEA,+BAWa;AAEb,sCAAyC;AACzC,oDAA4D;AAoGrD,KAAK,UAAU,aAAa,CAK/B,MAAsD,EACtD,EACI,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAClC,MAAM,EACN,OAAO,EACP,WAAW,EACX,KAAK,EAAE,MAAM,EAC6C;IAE9D,IAAI,CAAC,QAAQ,EAAE,CAAC;QACZ,MAAM,IAAI,+BAAoB,CAAC;YAC3B,QAAQ,EAAE,kCAAkC;SAC/C,CAAC,CAAA;IACN,CAAC;IAED,MAAM,OAAO,GAAG,IAAA,oBAAY,EAAC,QAAQ,CAAiB,CAAA;IAEtD,MAAM,KAAK,GAAG;QACV,YAAY,EAAE,IAAA,8BAAuB,EAAC,EAAE,MAAM,EAE7C,CAAC;QACF,GAAI,MAAqB;KAC5B,CAAA;IAED,IAAA,wBAAiB,EAAC;QACd,MAAM;QACN,OAAO;QACP,WAAW;QACX,KAAK;KACe,CAAC,CAAA;IAEzB,OAAO,OAAO,CAAC,aAAa,CAAC;QACzB,MAAM;QACN,WAAW;QACX,KAAK;QACL,OAAO;KACa,CAAC,CAAA;AAC7B,CAAC;AA1CD,sCA0CC"}
|
|
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.signUserOperation = void 0;
|
|
4
4
|
const account_abstraction_1 = require("viem/account-abstraction");
|
|
5
5
|
const utils_1 = require("viem/utils");
|
|
6
|
-
const
|
|
6
|
+
const index_js_1 = require("../../errors/index.js");
|
|
7
7
|
async function signUserOperation(client, args) {
|
|
8
8
|
const { account: account_ = client.account } = args;
|
|
9
9
|
if (!account_)
|
|
10
|
-
throw new
|
|
10
|
+
throw new index_js_1.AccountNotFoundError({
|
|
11
11
|
docsPath: "/docs/actions/wallet/sendTransaction"
|
|
12
12
|
});
|
|
13
13
|
const account = (0, utils_1.parseAccount)(account_);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signUserOperation.js","sourceRoot":"","sources":["../../../actions/account-client/signUserOperation.ts"],"names":[],"mappings":";;;AACA,kEAMiC;AACjC,sCAAoD;AACpD,
|
|
1
|
+
{"version":3,"file":"signUserOperation.js","sourceRoot":"","sources":["../../../actions/account-client/signUserOperation.ts"],"names":[],"mappings":";;;AACA,kEAMiC;AACjC,sCAAoD;AACpD,oDAA4D;AAUrD,KAAK,UAAU,iBAAiB,CAMnC,MAAyC,EACzC,IAAkE;IAElE,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI,CAAA;IACnD,IAAI,CAAC,QAAQ;QACT,MAAM,IAAI,+BAAoB,CAAC;YAC3B,QAAQ,EAAE,sCAAsC;SACnD,CAAC,CAAA;IAEN,MAAM,OAAO,GAAG,IAAA,oBAAY,EAAC,QAAQ,CAAiB,CAAA;IAEtD,MAAM,aAAa,GAAG,MAAM,IAAA,iBAAS,EACjC,MAAM,EACN,0CAAoB,EACpB,sBAAsB,CACzB,CAAC,EAAE,GAAG,IAAI,EAAE,OAAO,EAAoC,CAAC,CAAA;IAEzD,aAAa,CAAC,SAAS,GAAG,MAAM,OAAO,CAAC,iBAAiB,CACrD,aAA8B,CACjC,CAAA;IAED,OAAO,aAAa,CAAA;AACxB,CAAC;AA5BD,8CA4BC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copied from: https://github.com/pimlicolabs/permissionless.js/blob/main/packages/permissionless/actions/smartAccount/sendTransaction.ts
|
|
2
2
|
import { sendUserOperation, waitForUserOperationReceipt } from "viem/account-abstraction";
|
|
3
3
|
import { getAction, parseAccount } from "viem/utils";
|
|
4
|
-
import { AccountNotFoundError } from "../../errors";
|
|
4
|
+
import { AccountNotFoundError } from "../../errors/index.js";
|
|
5
5
|
/**
|
|
6
6
|
* Creates, signs, and sends a new transaction to the network.
|
|
7
7
|
* This function also allows you to sponsor this transaction if sender is a smartAccount
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sendTransaction.js","sourceRoot":"","sources":["../../../actions/account-client/sendTransaction.ts"],"names":[],"mappings":"AAAA,0IAA0I;AAS1I,OAAO,EAGH,iBAAiB,EACjB,2BAA2B,EAC9B,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"sendTransaction.js","sourceRoot":"","sources":["../../../actions/account-client/sendTransaction.ts"],"names":[],"mappings":"AAAA,0IAA0I;AAS1I,OAAO,EAGH,iBAAiB,EACjB,2BAA2B,EAC9B,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAOjC,MAAyC,EACzC,IAEkE;IAElE,IAAI,UAAgB,CAAA;IAEpB,IAAI,IAAI,IAAI,IAAI,EAAE,CAAC;QACf,MAAM,EACF,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAClC,IAAI,EACJ,YAAY,EACZ,oBAAoB,EACpB,EAAE,EACF,KAAK,EACL,KAAK,EACR,GAAG,IAAI,CAAA;QAER,IAAI,CAAC,QAAQ,EAAE,CAAC;YACZ,MAAM,IAAI,oBAAoB,CAAC;gBAC3B,QAAQ,EAAE,sCAAsC;aACnD,CAAC,CAAA;QACN,CAAC;QAED,MAAM,OAAO,GAAG,YAAY,CAAC,QAAQ,CAAiB,CAAA;QAEtD,IAAI,CAAC,EAAE;YAAE,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAA;QAE9C,UAAU,GAAG,MAAM,SAAS,CACxB,MAAM,EACN,iBAAiB,EACjB,mBAAmB,CACtB,CAAC;YACE,KAAK,EAAE;gBACH;oBACI,EAAE;oBACF,KAAK,EAAE,KAAK,IAAI,MAAM,CAAC,CAAC,CAAC;oBACzB,IAAI,EAAE,IAAI,IAAI,IAAI;iBACrB;aACJ;YACD,OAAO;YACP,YAAY;YACZ,oBAAoB;YACpB,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS;SAC3C,CAAC,CAAA;IACN,CAAC;SAAM,CAAC;QACJ,UAAU,GAAG,MAAM,SAAS,CACxB,MAAM,EACN,iBAAiB,EACjB,mBAAmB,CACtB,CAAC,EAAE,GAAG,IAAI,EAA2D,CAAC,CAAA;IAC3E,CAAC;IAED,MAAM,oBAAoB,GAAG,MAAM,SAAS,CACxC,MAAM,EACN,2BAA2B,EAC3B,6BAA6B,CAChC,CAAC;QACE,IAAI,EAAE,UAAU;KACnB,CAAC,CAAA;IAEF,OAAO,oBAAoB,EAAE,OAAO,CAAC,eAAe,CAAA;AACxD,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Copied from: https://github.com/pimlicolabs/permissionless.js/blob/main/packages/permissionless/actions/smartAccount/signMessage.ts
|
|
2
2
|
import { parseAccount } from "viem/utils";
|
|
3
|
-
import { AccountNotFoundError } from "../../errors";
|
|
3
|
+
import { AccountNotFoundError } from "../../errors/index.js";
|
|
4
4
|
/**
|
|
5
5
|
* Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`.
|
|
6
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signMessage.js","sourceRoot":"","sources":["../../../actions/account-client/signMessage.ts"],"names":[],"mappings":"AAAA,sIAAsI;AAUtI,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"signMessage.js","sourceRoot":"","sources":["../../../actions/account-client/signMessage.ts"],"names":[],"mappings":"AAAA,sIAAsI;AAUtI,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAC7B,MAAsD,EACtD,EACI,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAClC,OAAO,EACuB;IAElC,IAAI,CAAC,QAAQ;QACT,MAAM,IAAI,oBAAoB,CAAC;YAC3B,QAAQ,EAAE,kCAAkC;SAC/C,CAAC,CAAA;IAEN,MAAM,OAAO,GAAG,YAAY,CAAC,QAAQ,CAAiB,CAAA;IAEtD,OAAO,OAAO,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,CAAC,CAAA;AAC3C,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Copied from: https://github.com/pimlicolabs/permissionless.js/blob/main/packages/permissionless/actions/smartAccount/signTypedData.ts
|
|
2
2
|
import { getTypesForEIP712Domain, validateTypedData } from "viem";
|
|
3
3
|
import { parseAccount } from "viem/utils";
|
|
4
|
-
import { AccountNotFoundError } from "../../errors";
|
|
4
|
+
import { AccountNotFoundError } from "../../errors/index.js";
|
|
5
5
|
/**
|
|
6
6
|
* Signs typed data and calculates an Ethereum-specific signature in [https://eips.ethereum.org/EIPS/eip-712](https://eips.ethereum.org/EIPS/eip-712): `sign(keccak256("\x19\x01" ‖ domainSeparator ‖ hashStruct(message)))`
|
|
7
7
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signTypedData.js","sourceRoot":"","sources":["../../../actions/account-client/signTypedData.ts"],"names":[],"mappings":"AAAA,wIAAwI;AAExI,OAAO,EASH,uBAAuB,EACvB,iBAAiB,EACpB,MAAM,MAAM,CAAA;AAEb,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"signTypedData.js","sourceRoot":"","sources":["../../../actions/account-client/signTypedData.ts"],"names":[],"mappings":"AAAA,wIAAwI;AAExI,OAAO,EASH,uBAAuB,EACvB,iBAAiB,EACpB,MAAM,MAAM,CAAA;AAEb,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiGG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAK/B,MAAsD,EACtD,EACI,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAClC,MAAM,EACN,OAAO,EACP,WAAW,EACX,KAAK,EAAE,MAAM,EAC6C;IAE9D,IAAI,CAAC,QAAQ,EAAE,CAAC;QACZ,MAAM,IAAI,oBAAoB,CAAC;YAC3B,QAAQ,EAAE,kCAAkC;SAC/C,CAAC,CAAA;IACN,CAAC;IAED,MAAM,OAAO,GAAG,YAAY,CAAC,QAAQ,CAAiB,CAAA;IAEtD,MAAM,KAAK,GAAG;QACV,YAAY,EAAE,uBAAuB,CAAC,EAAE,MAAM,EAE7C,CAAC;QACF,GAAI,MAAqB;KAC5B,CAAA;IAED,iBAAiB,CAAC;QACd,MAAM;QACN,OAAO;QACP,WAAW;QACX,KAAK;KACe,CAAC,CAAA;IAEzB,OAAO,OAAO,CAAC,aAAa,CAAC;QACzB,MAAM;QACN,WAAW;QACX,KAAK;QACL,OAAO;KACa,CAAC,CAAA;AAC7B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { prepareUserOperation } from "viem/account-abstraction";
|
|
2
2
|
import { getAction, parseAccount } from "viem/utils";
|
|
3
|
-
import { AccountNotFoundError } from "../../errors";
|
|
3
|
+
import { AccountNotFoundError } from "../../errors/index.js";
|
|
4
4
|
export async function signUserOperation(client, args) {
|
|
5
5
|
const { account: account_ = client.account } = args;
|
|
6
6
|
if (!account_)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signUserOperation.js","sourceRoot":"","sources":["../../../actions/account-client/signUserOperation.ts"],"names":[],"mappings":"AACA,OAAO,EAKH,oBAAoB,EACvB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"signUserOperation.js","sourceRoot":"","sources":["../../../actions/account-client/signUserOperation.ts"],"names":[],"mappings":"AACA,OAAO,EAKH,oBAAoB,EACvB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAU5D,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAMnC,MAAyC,EACzC,IAAkE;IAElE,MAAM,EAAE,OAAO,EAAE,QAAQ,GAAG,MAAM,CAAC,OAAO,EAAE,GAAG,IAAI,CAAA;IACnD,IAAI,CAAC,QAAQ;QACT,MAAM,IAAI,oBAAoB,CAAC;YAC3B,QAAQ,EAAE,sCAAsC;SACnD,CAAC,CAAA;IAEN,MAAM,OAAO,GAAG,YAAY,CAAC,QAAQ,CAAiB,CAAA;IAEtD,MAAM,aAAa,GAAG,MAAM,SAAS,CACjC,MAAM,EACN,oBAAoB,EACpB,sBAAsB,CACzB,CAAC,EAAE,GAAG,IAAI,EAAE,OAAO,EAAoC,CAAC,CAAA;IAEzD,aAAa,CAAC,SAAS,GAAG,MAAM,OAAO,CAAC,iBAAiB,CACrD,aAA8B,CACjC,CAAA;IAED,OAAO,aAAa,CAAA;AACxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toSigner.d.ts","sourceRoot":"","sources":["../../utils/toSigner.ts"],"names":[],"mappings":"AACA,OAAO,EAEH,KAAK,OAAO,EAKZ,KAAK,YAAY,EAOpB,MAAM,MAAM,CAAA;AAIb,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"toSigner.d.ts","sourceRoot":"","sources":["../../utils/toSigner.ts"],"names":[],"mappings":"AACA,OAAO,EAEH,KAAK,OAAO,EAKZ,KAAK,YAAY,EAOpB,MAAM,MAAM,CAAA;AAIb,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAE/C,wBAAsB,QAAQ,CAAC,EAC3B,MAAM,EACN,OAAO,EACV,EAAE;IACC,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,OAAO,CAAA;CACpB,GAAG,OAAO,CAAC,YAAY,CAAC,CA8ExB"}
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
waitForUserOperationReceipt
|
|
15
15
|
} from "viem/account-abstraction"
|
|
16
16
|
import { getAction, parseAccount } from "viem/utils"
|
|
17
|
-
import { AccountNotFoundError } from "../../errors"
|
|
17
|
+
import { AccountNotFoundError } from "../../errors/index.js"
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Creates, signs, and sends a new transaction to the network.
|
|
@@ -9,7 +9,7 @@ import type {
|
|
|
9
9
|
} from "viem"
|
|
10
10
|
import type { SmartAccount } from "viem/account-abstraction"
|
|
11
11
|
import { parseAccount } from "viem/utils"
|
|
12
|
-
import { AccountNotFoundError } from "../../errors"
|
|
12
|
+
import { AccountNotFoundError } from "../../errors/index.js"
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Calculates an Ethereum-specific signature in [EIP-191 format](https://eips.ethereum.org/EIPS/eip-191): `keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))`.
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from "viem"
|
|
15
15
|
import type { SmartAccount } from "viem/account-abstraction"
|
|
16
16
|
import { parseAccount } from "viem/utils"
|
|
17
|
-
import { AccountNotFoundError } from "../../errors"
|
|
17
|
+
import { AccountNotFoundError } from "../../errors/index.js"
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Signs typed data and calculates an Ethereum-specific signature in [https://eips.ethereum.org/EIPS/eip-712](https://eips.ethereum.org/EIPS/eip-712): `sign(keccak256("\x19\x01" ‖ domainSeparator ‖ hashStruct(message)))`
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
prepareUserOperation
|
|
8
8
|
} from "viem/account-abstraction"
|
|
9
9
|
import { getAction, parseAccount } from "viem/utils"
|
|
10
|
-
import { AccountNotFoundError } from "../../errors"
|
|
10
|
+
import { AccountNotFoundError } from "../../errors/index.js"
|
|
11
11
|
|
|
12
12
|
export type SignUserOperationParameters<
|
|
13
13
|
account extends SmartAccount | undefined = SmartAccount | undefined,
|
package/package.json
CHANGED
package/utils/toSigner.ts
CHANGED
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
import { toAccount } from "viem/accounts"
|
|
18
18
|
|
|
19
19
|
import { signMessage, signTypedData } from "viem/actions"
|
|
20
|
-
import type { Signer } from "../types"
|
|
20
|
+
import type { Signer } from "../types/index.js"
|
|
21
21
|
|
|
22
22
|
export async function toSigner({
|
|
23
23
|
signer,
|